From c7c1e4d47f1360ec834cbe45eb6afba7bb946b35 Mon Sep 17 00:00:00 2001 From: "jbates@chromium.org" Date: Wed, 22 Aug 2012 04:06:06 +0000 Subject: Make printf and LOG output to cmd console for Windows BUG=142722 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=152432 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=152566 Review URL: https://chromiumcodereview.appspot.com/10832309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152722 0039d316-1c4b-4281-b951-d872f2087c98 --- content/app/content_main_runner.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'content') diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index 58dc14b..4d76ab1 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -530,6 +530,12 @@ static void ReleaseFreeMemoryThunk() { SetContentClient(&empty_content_client_); ContentClientInitializer::Set(process_type, delegate_); +#if defined(OS_WIN) + // Route stdio to parent console (if any) or create one. + if (command_line.HasSwitch(switches::kEnableLogging)) + base::RouteStdioToConsole(); +#endif + // Enable startup tracing asap to avoid early TRACE_EVENT calls being // ignored. if (command_line.HasSwitch(switches::kTraceStartup)) { -- cgit v1.1