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

Unified Diff: base/logging.cc

Issue 2544853003: Store log messages in global activity tracker. (Closed)
Patch Set: added comment about NUL terminator Created 4 years 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/debug/activity_tracker.h ('K') | « base/debug/activity_tracker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index e0ca19933e75d546cb18c755c0f8024b23de776d..7bd6d63befca8244720bddd1ed5ba4d1771e68ed 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -7,6 +7,7 @@
#include <limits.h>
#include <stdint.h>
+#include "base/debug/activity_tracker.h"
#include "base/macros.h"
#include "build/build_config.h"
@@ -722,6 +723,12 @@ LogMessage::~LogMessage() {
}
if (severity_ == LOG_FATAL) {
+ // Write the log message to the global activity tracker, if running.
+ base::debug::GlobalActivityTracker* tracker =
+ base::debug::GlobalActivityTracker::Get();
+ if (tracker)
+ tracker->RecordLogMessage(str_newline);
+
// Ensure the first characters of the string are on the stack so they
// are contained in minidumps for diagnostic purposes.
char str_stack[1024];
« base/debug/activity_tracker.h ('K') | « base/debug/activity_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698