summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 21:53:52 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 21:53:52 +0000
commit3deeb6b32551ab2ed209ab361e5efcc404f91bba (patch)
tree5d804421e0b7fe59879deaa225349b94c6fe0b31 /chrome/common
parent002a0b0663d27a9024cd5e404555a43a2f82fe80 (diff)
downloadchromium_src-3deeb6b32551ab2ed209ab361e5efcc404f91bba.zip
chromium_src-3deeb6b32551ab2ed209ab361e5efcc404f91bba.tar.gz
chromium_src-3deeb6b32551ab2ed209ab361e5efcc404f91bba.tar.bz2
logging: set the default log level to INFO
Previously we'd only show LOG(WARNING) or above. This change makes us show LOG(INFO) as well. Now that we have VLOG(), we should remove LOG(INFO) for information we don't care about. Review URL: http://codereview.chromium.org/3599016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61566 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/logging_chrome.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 4441c69..beab5b8 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -213,16 +213,18 @@ void InitChromeLogging(const CommandLine& command_line,
command_line.HasSwitch(switches::kNoErrorDialogs))
SuppressDialogs();
- // Use a minimum log level if the command line has one, otherwise set the
- // default to LOG_WARNING.
- std::string log_level = command_line.GetSwitchValueASCII(
- switches::kLoggingLevel);
- int level = 0;
- if (base::StringToInt(log_level, &level)) {
- if ((level >= 0) && (level < LOG_NUM_SEVERITIES))
+ // Use a minimum log level if the command line asks for one,
+ // otherwise leave it at the default level (INFO).
+ if (command_line.HasSwitch(switches::kLoggingLevel)) {
+ std::string log_level = command_line.GetSwitchValueASCII(
+ switches::kLoggingLevel);
+ int level = 0;
+ if (base::StringToInt(log_level, &level) &&
+ level >= 0 && level < LOG_NUM_SEVERITIES) {
logging::SetMinLogLevel(level);
- } else {
- logging::SetMinLogLevel(LOG_WARNING);
+ } else {
+ LOG(WARNING) << "Bad log level: " << log_level;
+ }
}
#if defined(OS_WIN)