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

Unified Diff: net/tools/stress_cache/stress_cache.cc

Issue 2497833002: support multiple log message handlers in base/logging.h (Closed)
Patch Set: 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
« no previous file with comments | « ios/chrome/browser/crash_report/breakpad_helper.mm ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/stress_cache/stress_cache.cc
diff --git a/net/tools/stress_cache/stress_cache.cc b/net/tools/stress_cache/stress_cache.cc
index fefcd72f23d7177f48a743d6bc33cf610fe72b67..78ae495cfdbd70a7d3aeabdf6f8f8310c998b045 100644
--- a/net/tools/stress_cache/stress_cache.cc
+++ b/net/tools/stress_cache/stress_cache.cc
@@ -384,8 +384,10 @@ void CrashHandler(const std::string& str) {
base::debug::BreakDebugger();
}
-bool MessageHandler(int severity, const char* file, int line,
- size_t message_start, const std::string& str) {
+bool MessageHandler(int severity,
+ const std::string& file,
+ int line,
+ const std::string& str) {
const size_t kMaxMessageLen = 48;
char message[kMaxMessageLen];
size_t len = std::min(str.length() - message_start, kMaxMessageLen - 1);
@@ -415,7 +417,7 @@ int main(int argc, const char* argv[]) {
return MasterCode();
logging::SetLogAssertHandler(CrashHandler);
- logging::SetLogMessageHandler(MessageHandler);
+ logging::AddLogMessageHandler(MessageHandler);
#if defined(OS_WIN)
logging::LogEventProvider::Initialize(kStressCacheTraceProviderName);
« no previous file with comments | « ios/chrome/browser/crash_report/breakpad_helper.mm ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698