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

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

Issue 1447273002: Mojo Log service and a thread-safe client library. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix destructor race condition in log_client.cc; add some comments Created 5 years, 1 month 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: mojo/public/cpp/environment/lib/logging.cc
diff --git a/mojo/public/cpp/environment/lib/logging.cc b/mojo/public/cpp/environment/lib/logging.cc
index 57f18924820ebe8bbbd156f8df1b796f31fbcf26..91f0ef5095a3d16fa822e7a8cd73325c5c0c62df 100644
--- a/mojo/public/cpp/environment/lib/logging.cc
+++ b/mojo/public/cpp/environment/lib/logging.cc
@@ -32,6 +32,9 @@ const char* GetFilename(const char* s) {
// TODO(vtl): Maybe we should preserve the full path and strip it out at a
// different level instead?
+// TODO(vardhan): Should we make a timestamp part of the LogMessage? Since we
+// emit log messages only when we go out of scope, we won't know exactly when
+// log messages are issued.
LogMessage::LogMessage(MojoLogLevel log_level, const char* file, int line)
: log_level_(log_level), file_(GetFilename(file)), line_(line) {
}

Powered by Google App Engine
This is Rietveld 408576698