diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 22:26:41 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 22:26:41 +0000 |
commit | f2235535256490c0509a955407afe31742e75f5c (patch) | |
tree | 2618cdb763b921e65f5d84ac14d4fcf9b2bbbdf2 /base/logging.cc | |
parent | a3fa4f9ac273b9a56c387e9d7965c309367748b9 (diff) | |
download | chromium_src-f2235535256490c0509a955407afe31742e75f5c.zip chromium_src-f2235535256490c0509a955407afe31742e75f5c.tar.gz chromium_src-f2235535256490c0509a955407afe31742e75f5c.tar.bz2 |
Made logging macros evaluate its stream arguments lazily.
Also added logging unittests.
BUG=57383
TEST=logging_unittest.cc
Review URL: http://codereview.chromium.org/3575008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61127 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.cc')
-rw-r--r-- | base/logging.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/base/logging.cc b/base/logging.cc index f0c6217..ce05d21 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; |