Chromium Code Reviews| Index: third_party/webrtc_overrides/webrtc/base/logging.cc |
| diff --git a/third_party/webrtc_overrides/webrtc/base/logging.cc b/third_party/webrtc_overrides/webrtc/base/logging.cc |
| index db888c1a4ad2c43c0cb526d3859dbab90ee43a01..855ae6bf489f548e6c203f2258c325cb862b39fb 100644 |
| --- a/third_party/webrtc_overrides/webrtc/base/logging.cc |
| +++ b/third_party/webrtc_overrides/webrtc/base/logging.cc |
| @@ -13,8 +13,10 @@ |
| #include <algorithm> |
| #include <iomanip> |
| +#include <string> |
| #include "base/atomicops.h" |
| +#include "base/command_line.h" |
| #include "base/logging.h" |
| #include "base/strings/string_util.h" |
| #include "base/threading/platform_thread.h" |
| @@ -49,6 +51,16 @@ static_assert(sizeof(base::subtle::Atomic32) == sizeof(base::PlatformThreadId), |
| base::subtle::Atomic32 g_init_logging_delegate_thread_id = 0; |
| #endif |
| +void InitChromiumLoggingAndCommandLine() { |
| + // 0 means no arguments, so the null argv is never touched |
| + base::CommandLine::Init(0, nullptr); |
| + |
| + // Chromium checks for the presence of --v when deciding log level. |
| + // Note that the *value* of --v doesn't matter for this check. |
| + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII("v", ""); |
| + logging::InitLogging(logging::LoggingSettings()); |
| +} |
| + |
| ///////////////////////////////////////////////////////////////////////////// |
| // Constant Labels |
| ///////////////////////////////////////////////////////////////////////////// |
| @@ -201,8 +213,8 @@ DiagnosticLogMessage::~DiagnosticLogMessage() { |
| } |
| // static |
| -void LogMessage::LogToDebug(int min_sev) { |
| - logging::SetMinLogLevel(min_sev); |
| +void LogMessage::LogToDebug(LoggingSeverity min_sev) { |
| + logging::SetMinLogLevel(WebRtcSevToChromeSev(min_sev)); |
|
Henrik Grunell
2016/05/18 08:43:26
Yes, this was indeed wrong. Great to have it fixed
|
| } |
| // Note: this function is a copy from the overriden libjingle implementation. |