diff options
author | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-25 23:28:37 +0000 |
---|---|---|
committer | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-25 23:28:37 +0000 |
commit | 31ae0353ec4b213993eeeaadae8913e116e5bb7b (patch) | |
tree | a33ddb466dba48c8d27d1ae2483c643499a1e1f8 | |
parent | dec5e6a66e066324110b4b2566fd12b9646ca299 (diff) | |
download | chromium_src-31ae0353ec4b213993eeeaadae8913e116e5bb7b.zip chromium_src-31ae0353ec4b213993eeeaadae8913e116e5bb7b.tar.gz chromium_src-31ae0353ec4b213993eeeaadae8913e116e5bb7b.tar.bz2 |
An earlier change I made sent all logging output to stderr. The webkit layout tests use stdout and stderr to diff against a known baseline, so this breaks some tests. For now, move the fprintf into the #else. This still leaves Windows and Mac in a state where they won't be able to pass layout tests, until the layout tests can be changed to initialize logging and set the log level to something less verbose.
BUG=1343647
TBR=brettw
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1353 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/logging.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/base/logging.cc b/base/logging.cc index da92f3c..e0951d8 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -413,9 +413,18 @@ LogMessage::~LogMessage() { logging_destination == LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG) { #if defined(OS_WIN) OutputDebugStringA(str_newline.c_str()); -#endif - // Output to stderr too so that unit tests can benefit as well. +#elif defined(OS_POSIX) + // TODO(erikkay): this interferes with the layout tests since it grabs + // stderr and stdout and diffs them against known data. Our info and warn + // logs add noise to that. Ideally, the layout tests would set the log + // level to ignore anything below error. When that happens, we should + // take this fprintf out of the #else so that Windows users can benefit + // from the output when running tests from the command-line. In the + // meantime, we leave this in for Mac and Linux, but until this is fixed + // they won't be able to pass any layout tests that have info or warn logs. + // See http://b/1343647 fprintf(stderr, "%s", str_newline.c_str()); +#endif } else if (severity_ >= kAlwaysPrintErrorLevel) { // When we're only outputting to a log file, above a certain log level, we // should still output to stderr so that we can better detect and diagnose |