diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2018-10-09 10:44:07 -0400 |
---|---|---|
committer | Henrik Edin <henrik.edin@mongodb.com> | 2018-10-10 13:09:41 -0400 |
commit | 7997dbf403430b757ff485ffa8a3aa4d56cb16a7 (patch) | |
tree | fbdf2d92335b4a0ff836ec402a47743303eb447c /src/mongo/logger | |
parent | 5145d0a4f4df8216cc5dadb550d79bc65b981fb4 (diff) | |
download | mongo-7997dbf403430b757ff485ffa8a3aa4d56cb16a7.tar.gz |
SERVER-20603 Add component information to syslog logging
Diffstat (limited to 'src/mongo/logger')
-rw-r--r-- | src/mongo/logger/message_event_utf8_encoder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/logger/message_event_utf8_encoder.cpp b/src/mongo/logger/message_event_utf8_encoder.cpp index e616d3402a3..56ab18441b9 100644 --- a/src/mongo/logger/message_event_utf8_encoder.cpp +++ b/src/mongo/logger/message_event_utf8_encoder.cpp @@ -142,6 +142,10 @@ std::ostream& MessageEventDetailsEncoder::encode(const MessageEventEphemeral& ev MessageEventWithContextEncoder::~MessageEventWithContextEncoder() {} std::ostream& MessageEventWithContextEncoder::encode(const MessageEventEphemeral& event, std::ostream& os) { + LogComponent component = event.getComponent(); + os << component; + os << ' '; + StringData contextName = event.getContextName(); if (!contextName.empty()) { os << '[' << contextName << "] "; |