summaryrefslogtreecommitdiff
path: root/src/mongo/logger
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2018-10-09 10:44:07 -0400
committerHenrik Edin <henrik.edin@mongodb.com>2018-10-10 13:09:41 -0400
commit7997dbf403430b757ff485ffa8a3aa4d56cb16a7 (patch)
treefbdf2d92335b4a0ff836ec402a47743303eb447c /src/mongo/logger
parent5145d0a4f4df8216cc5dadb550d79bc65b981fb4 (diff)
downloadmongo-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.cpp4
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 << "] ";