summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-26 17:48:18 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-26 17:48:18 +0000
commit107bc0f10ffee29e7508d23f2f6ffce00f95060c (patch)
tree093c69fbcc586c3a255a20e8870db4b8124bbb38
parent515cafde473118ffd6f6c4df7bc2474f2d997974 (diff)
downloadchromium_src-107bc0f10ffee29e7508d23f2f6ffce00f95060c.zip
chromium_src-107bc0f10ffee29e7508d23f2f6ffce00f95060c.tar.gz
chromium_src-107bc0f10ffee29e7508d23f2f6ffce00f95060c.tar.bz2
Another attempt at enabling stderr logging for ERROR and FATAL logs. This will break a few layout tests. (I'll add them to the fixable list shortly)
BUG=1343647 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1385 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/logging.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/logging.cc b/base/logging.cc
index e0951d8..3a6f928 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -413,7 +413,8 @@ LogMessage::~LogMessage() {
logging_destination == LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG) {
#if defined(OS_WIN)
OutputDebugStringA(str_newline.c_str());
-#elif defined(OS_POSIX)
+ if (severity_ >= kAlwaysPrintErrorLevel)
+#endif
// 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
@@ -424,7 +425,6 @@ LogMessage::~LogMessage() {
// 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