diff options
-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 |