Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: third_party/libjingle/overrides/initialize_module.cc

Issue 14617016: Forward log calls to Chrome's log handler and not create a specific log file for libpeerconnection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libjingle/overrides/init_webrtc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libjingle/overrides/initialize_module.cc
diff --git a/third_party/libjingle/overrides/initialize_module.cc b/third_party/libjingle/overrides/initialize_module.cc
index c3d608d7a0d383d848027204a1235dc832ef00f8..a52053f094ddfc6816b4c1d7038f93e09c0b0c8f 100644
--- a/third_party/libjingle/overrides/initialize_module.cc
+++ b/third_party/libjingle/overrides/initialize_module.cc
@@ -48,6 +48,7 @@ bool InitializeModule(const CommandLine& command_line,
AllocateFunction alloc,
DellocateFunction dealloc,
#endif
+ logging::LogMessageHandlerFunction log_handler,
CreateWebRtcMediaEngineFunction* create_media_engine,
DestroyWebRtcMediaEngineFunction* destroy_media_engine) {
#if !defined(OS_MACOSX)
@@ -64,14 +65,15 @@ bool InitializeModule(const CommandLine& command_line,
// done the equivalent thing via the GetCommandLine() API.
CommandLine::ForCurrentProcess()->AppendArguments(command_line, true);
#endif
-
- // TODO(tommi): Use SetLogMessageHandler.
logging::InitLogging(
- FILE_PATH_LITERAL("libpeerconnection.log"),
- logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG,
+ NULL,
+ logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
logging::LOCK_LOG_FILE,
- logging::APPEND_TO_OLD_LOG_FILE,
+ logging::DELETE_OLD_LOG_FILE,
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
+
+ // Override the log message handler to forward logs to chrome's handler.
+ logging::SetLogMessageHandler(log_handler);
}
return true;
« no previous file with comments | « third_party/libjingle/overrides/init_webrtc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698