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

Unified Diff: chrome/common/logging_chrome.cc

Issue 2530163002: Make the name of the event source for SYSLOG configurable. (Closed)
Patch Set: Fix BUILD.gn Created 4 years, 1 month 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
« base/syslog_logging.cc ('K') | « chrome/common/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/logging_chrome.cc
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 183d4e84792abcfdcc0c4764a51600653d4f6504..584c5204a8d906f7ab34cef444ff8b3c579a6551 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -61,6 +61,8 @@
#if defined(OS_WIN)
#include <initguid.h>
#include "base/logging_win.h"
+#include "base/syslog_logging.h"
+#include "chrome/install_static/install_modes.h"
#endif
namespace {
@@ -359,6 +361,10 @@ void InitChromeLogging(const base::CommandLine& command_line,
#if defined(OS_WIN)
// Enable trace control and transport through event tracing for Windows.
logging::LogEventProvider::Initialize(kChromeTraceProviderName);
+
+ // Enable logging to the Windows Event Log.
+ logging::SetEventSourceName(
+ base::UTF16ToASCII(install_static::kProductPathName));
grt (UTC plus 2) 2016/11/25 15:25:35 while this will be a brand-specific string (e.g.,
pastarmovj 2016/11/28 12:23:03 I am not convinced that this particular use case d
#endif
base::StatisticsRecorder::InitLogOnShutdown();
« base/syslog_logging.cc ('K') | « chrome/common/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698