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

Unified Diff: base/logging_win.h

Issue 2034393004: Allow multiple logging::LogMessage{Handler,Listener}s Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 3 years, 11 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 | « base/logging_unittest.cc ('k') | base/logging_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging_win.h
diff --git a/base/logging_win.h b/base/logging_win.h
index cdde7bb687cbbd524a0b5e412e0a2c6714b06f3f..3a042249376bc16fa159ac14a34b96e332ee9cbc 100644
--- a/base/logging_win.h
+++ b/base/logging_win.h
@@ -7,6 +7,7 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include "base/base_export.h"
@@ -57,9 +58,6 @@ class BASE_EXPORT LogEventProvider : public base::win::EtwTraceProvider {
public:
static LogEventProvider* GetInstance();
- static bool LogMessage(logging::LogSeverity severity, const char* file,
- int line, size_t message_start, const std::string& str);
-
static void Initialize(const GUID& provider_name);
static void Uninitialize();
@@ -70,7 +68,17 @@ class BASE_EXPORT LogEventProvider : public base::win::EtwTraceProvider {
private:
LogEventProvider();
-
+ ~LogEventProvider() override;
+
+ class WinLogMessageListener : LogMessageListener {
+ public:
+ void OnMessage(logging::LogSeverity severity,
+ const char* file,
+ int line,
+ size_t message_start,
+ const std::string& str) override;
+ };
+ std::unique_ptr<WinLogMessageListener> log_listener_;
// The log severity prior to OnEventsEnabled,
// restored in OnEventsDisabled.
logging::LogSeverity old_log_level_;
« no previous file with comments | « base/logging_unittest.cc ('k') | base/logging_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698