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

Unified Diff: base/logging.h

Issue 2288473002: Implement Dump-on-DCHECK (via a new LogSeverity). (Closed)
Patch Set: Break out sub-component CLs 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.h
diff --git a/base/logging.h b/base/logging.h
index 7854e3934e974b4670930d6855f3ab8699a8376f..7a60aa7496609694d9fe3ef27660705065da4648 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -297,10 +297,13 @@ const LogSeverity LOG_INFO = 0;
const LogSeverity LOG_WARNING = 1;
const LogSeverity LOG_ERROR = 2;
const LogSeverity LOG_FATAL = 3;
-const LogSeverity LOG_NUM_SEVERITIES = 4;
+const LogSeverity LOG_DUMP = 4;
Wez 2017/01/15 01:18:42 gab, danakj: I'm concerned about adding this new L
+const LogSeverity LOG_NUM_SEVERITIES = 5;
// LOG_DFATAL is LOG_FATAL in debug mode, ERROR in normal mode
-#ifdef NDEBUG
+#if defined(DCHECK_IS_DUMP_WITHOUT_CRASH)
+const LogSeverity LOG_DFATAL = LOG_DUMP;
+#elif NDEBUG
const LogSeverity LOG_DFATAL = LOG_ERROR;
#else
const LogSeverity LOG_DFATAL = LOG_FATAL;
@@ -694,9 +697,9 @@ enum { DEBUG_MODE = DCHECK_IS_ON() };
#if DCHECK_IS_ON()
#define COMPACT_GOOGLE_LOG_EX_DCHECK(ClassName, ...) \
- COMPACT_GOOGLE_LOG_EX_FATAL(ClassName , ##__VA_ARGS__)
-#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_FATAL
-const LogSeverity LOG_DCHECK = LOG_FATAL;
+ COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ##__VA_ARGS__)
+#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_DFATAL
+const LogSeverity LOG_DCHECK = LOG_DFATAL;
#else // DCHECK_IS_ON()

Powered by Google App Engine
This is Rietveld 408576698