summaryrefslogtreecommitdiffstats
path: root/chrome/common/logging_chrome.cc
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 01:29:12 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 01:29:12 +0000
commit3bba958a050be8ddc6cc6fbae33e2ea94b310935 (patch)
treee5d5c76638b38fbe4a0c1b295277742bedf25137 /chrome/common/logging_chrome.cc
parent132c8565a63ad57d680b6b8d9beaa28786a46ea8 (diff)
downloadchromium_src-3bba958a050be8ddc6cc6fbae33e2ea94b310935.zip
chromium_src-3bba958a050be8ddc6cc6fbae33e2ea94b310935.tar.gz
chromium_src-3bba958a050be8ddc6cc6fbae33e2ea94b310935.tar.bz2
Linux: forward --log-level from the browser to the zygote.
BUG=none TEST=pass --log-level=0 on startup, the setting will now be used in the renderers Review URL: http://codereview.chromium.org/159881 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/logging_chrome.cc')
-rw-r--r--chrome/common/logging_chrome.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 6e63a33..3f497f3 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -104,7 +104,12 @@ void InitChromeLogging(const CommandLine& command_line,
logging::LoggingDestination log_mode;
if (enable_logging) {
- log_mode = kDefaultLoggingMode;
+ // Let --enable-logging=stderr force only stderr, particularly useful for
+ // non-debug builds where otherwise you can't get logs to stderr at all.
+ if (command_line.GetSwitchValue(switches::kEnableLogging) == L"stderr")
+ log_mode = logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG;
+ else
+ log_mode = kDefaultLoggingMode;
} else {
log_mode = logging::LOG_NONE;
}