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

Unified Diff: base/logging_win.cc

Issue 2034393004: Allow multiple logging::LogMessage{Handler,Listener}s Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up, MockLog uses listener Created 4 years, 5 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
Index: base/logging_win.cc
diff --git a/base/logging_win.cc b/base/logging_win.cc
index 319ae8a9d38186aa7ffc6466f574c2a795a1832c..9aab9b08f521dc2afe54b0c5335a6fb5049d34b6 100644
--- a/base/logging_win.cc
+++ b/base/logging_win.cc
@@ -88,7 +88,8 @@ bool LogEventProvider::LogMessage(logging::LogSeverity severity,
provider->Log(event.get());
}
- // Don't increase verbosity in other log destinations.
+ // Don't increase verbosity in other log destinations below this handler
wychen 2016/07/09 21:21:20 The verbosity is still increased for handlers abov
+ // in the handler stack.
if (severity < provider->old_log_level_)
return true;
@@ -102,11 +103,12 @@ void LogEventProvider::Initialize(const GUID& provider_name) {
provider->Register();
// Register our message handler with logging.
- SetLogMessageHandler(LogMessage);
+ PushLogMessageHandler(LogMessage);
}
void LogEventProvider::Uninitialize() {
LogEventProvider::GetInstance()->Unregister();
+ PopLogMessageHandler(LogMessage);
}
void LogEventProvider::OnEventsEnabled() {

Powered by Google App Engine
This is Rietveld 408576698