Chromium Code Reviews| Index: chrome/common/logging_chrome.cc |
| diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc |
| index 7d265871ed6e69b2adc35799e266ee33f5786034..cec98c470da94949cb158dd227434c6501fd605e 100644 |
| --- a/chrome/common/logging_chrome.cc |
| +++ b/chrome/common/logging_chrome.cc |
| @@ -336,14 +336,18 @@ void InitChromeLogging(const base::CommandLine& command_line, |
| // 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 { |
| - DLOG(WARNING) << "Bad log level: " << log_level; |
| + // Use this switch unless the vlogging level was specified in the command |
| + // line by another switch. |
| + if (logging::GetMinLogLevel() >= 0) { |
|
Lei Zhang
2015/05/14 02:31:31
Do this in the same if statement as the command_li
emaxx
2015/05/15 12:59:42
Done.
|
| + 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 { |
| + DLOG(WARNING) << "Bad log level: " << log_level; |
| + } |
| } |
| } |