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

Unified Diff: base/logging.cc

Issue 2638763004: Report CHECK/DCHECK to test launcher summary output. (Closed)
Patch Set: Add stack trace marker. 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
Index: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index cea6edae4a37cef2519ff32045c46c0a3c73e4d0..38c6d66c0bc54ec92219730124155f3dcd115605 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -342,6 +342,8 @@ void CloseLogFileUnlocked() {
} // namespace
+const char kStackTraceMarker[] = "\nStack trace is below:\n";
Paweł Hajdan Jr. 2017/01/23 16:55:06 nit: Could you remove " is below" part?
alex-ac 2017/01/27 12:55:45 Done.
+
// This is never instantiated, it's just used for EAT_STREAM_PARAMETERS to have
// an object of the correct type on the LHS of the unused part of the ternary
// operator.
@@ -535,7 +537,8 @@ LogMessage::~LogMessage() {
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
// Include a stack trace on a fatal, unless a debugger is attached.
base::debug::StackTrace trace;
- stream_ << std::endl; // Newline to separate from log message.
+ // Write marker to separate stack trace from message.
+ stream_ << kStackTraceMarker;
trace.OutputToStream(&stream_);
}
#endif
« no previous file with comments | « base/logging.h ('k') | base/logging_unittest.cc » ('j') | base/test/test_suite.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698