Index: third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc |
diff --git a/third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc b/third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc |
index 57f18924820ebe8bbbd156f8df1b796f31fbcf26..990626df7365c8ece6c0ac6176a166127257cacc 100644 |
--- a/third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc |
+++ b/third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc |
@@ -30,15 +30,15 @@ const char* GetFilename(const char* s) { |
} // namespace |
-// TODO(vtl): Maybe we should preserve the full path and strip it out at a |
-// different level instead? |
-LogMessage::LogMessage(MojoLogLevel log_level, const char* file, int line) |
- : log_level_(log_level), file_(GetFilename(file)), line_(line) { |
+LogMessage::LogMessage(const char* file, int line, MojoLogLevel log_level) |
+ : log_level_(log_level) { |
+ // Note: Don't include the log level in the message, since that's passed on. |
+ stream_ << GetFilename(file) << '(' << line << "): "; |
} |
LogMessage::~LogMessage() { |
- Environment::GetDefaultLogger()->LogMessage( |
- log_level_, file_, static_cast<uint32_t>(line_), stream_.str().c_str()); |
+ Environment::GetDefaultLogger()->LogMessage(log_level_, |
+ stream_.str().c_str()); |
} |
} // namespace internal |