Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc

Issue 1157843002: Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 990626df7365c8ece6c0ac6176a166127257cacc..57f18924820ebe8bbbd156f8df1b796f31fbcf26 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
-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 << "): ";
+// 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() {
- Environment::GetDefaultLogger()->LogMessage(log_level_,
- stream_.str().c_str());
+ Environment::GetDefaultLogger()->LogMessage(
+ log_level_, file_, static_cast<uint32_t>(line_), stream_.str().c_str());
}
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698