diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 02:26:04 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 02:26:04 +0000 |
commit | 2c3229ecedf2c3e86f041676d5974e1133e4f6e0 (patch) | |
tree | 20876251a3d6e61e6e68bab92327f6cf3de0f275 /base/logging.cc | |
parent | 14e2b8be2e44bd8e6836c43fdab55ba902784813 (diff) | |
download | chromium_src-2c3229ecedf2c3e86f041676d5974e1133e4f6e0.zip chromium_src-2c3229ecedf2c3e86f041676d5974e1133e4f6e0.tar.gz chromium_src-2c3229ecedf2c3e86f041676d5974e1133e4f6e0.tar.bz2 |
Made logging macros evaluate its stream arguments lazily.
Also added logging unittests.
BUG=57383
TEST=logging_unittest.cc
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61127
Review URL: http://codereview.chromium.org/3575008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61142 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; |