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

Unified Diff: base/logging.cc

Issue 3575008: Made logging macros evaluate its stream arguments lazily. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Fixed more problems, added more comments/tests Created 10 years, 3 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
« no previous file with comments | « base/logging.h ('k') | base/logging_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index f0c6217cbdd823288855b27bd125e934b90fdd00..ce05d21e8f5c0021279d1c315c32fd666374beb1 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -561,8 +561,9 @@ void LogMessage::Init(const char* file, int line) {
}
LogMessage::~LogMessage() {
- // TODO(brettw) modify the macros so that nothing is executed when the log
- // level is too high.
+ // The macros in logging.h should already avoid creating LogMessages
+ // when this holds, but it's possible that users create LogMessages
+ // directly (e.g., using LOG_STREAM() directly).
if (severity_ < min_log_level)
return;
« no previous file with comments | « base/logging.h ('k') | base/logging_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698