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

Unified Diff: chrome/chrome_watcher/chrome_watcher_main.cc

Issue 2850863002: Initialize logging for Chrome watcher process (Closed)
Patch Set: Initialize logging for Chrome watcher process Created 3 years, 8 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 | « chrome/chrome_watcher/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/chrome_watcher/chrome_watcher_main.cc
diff --git a/chrome/chrome_watcher/chrome_watcher_main.cc b/chrome/chrome_watcher/chrome_watcher_main.cc
index b958a889989c889fe9d3c671cf735aa36b10d753..b231cb60bf35ac9bb3a129be8bc11967ab168afe 100644
--- a/chrome/chrome_watcher/chrome_watcher_main.cc
+++ b/chrome/chrome_watcher/chrome_watcher_main.cc
@@ -36,6 +36,7 @@
#include "base/win/scoped_handle.h"
#include "base/win/win_util.h"
#include "chrome/chrome_watcher/chrome_watcher_main_api.h"
+#include "chrome/common/logging_chrome.h"
#include "chrome/install_static/initialize_from_primary_module.h"
#include "components/browser_watcher/endsession_watcher_window_win.h"
#include "components/browser_watcher/exit_code_watcher_win.h"
@@ -197,7 +198,9 @@ extern "C" int WatcherMain(const base::char16* registry_path,
base::AtExitManager exit_manager;
// Initialize the commandline singleton from the environment.
base::CommandLine::Init(0, nullptr);
+ const base::CommandLine& cmd_line = *base::CommandLine::ForCurrentProcess();
+ logging::InitChromeLogging(cmd_line, logging::APPEND_TO_OLD_LOG_FILE);
logging::LogEventProvider::Initialize(kChromeWatcherTraceProviderName);
// Arrange to be shut down as late as possible, as we want to outlive
@@ -208,7 +211,6 @@ extern "C" int WatcherMain(const base::char16* registry_path,
base::EnableTerminationOnHeapCorruption();
base::EnableTerminationOnOutOfMemory();
base::win::RegisterInvalidParamHandler();
- const base::CommandLine& cmd_line = *base::CommandLine::ForCurrentProcess();
base::win::SetupCRT(cmd_line);
// Run a UI message loop on the main thread.
« no previous file with comments | « chrome/chrome_watcher/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698