feat: add missing debug logging macros (#986)
This commit is contained in:
parent
6607b369d0
commit
716be9edc7
@ -388,6 +388,8 @@ excessive logging.
|
||||
DLOG(INFO) << "Found cookies";
|
||||
DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
|
||||
DLOG_EVERY_N(INFO, 10) << "Got the " << google::COUNTER << "th cookie";
|
||||
DLOG_FIRST_N(INFO, 10) << "Got the " << google::COUNTER << "th cookie";
|
||||
DLOG_EVERY_T(INFO, 0.01) << "Got a cookie";
|
||||
|
||||
|
||||
``CHECK`` Macros
|
||||
|
||||
@ -1175,6 +1175,8 @@ const LogSeverity GLOG_0 = GLOG_ERROR;
|
||||
#define DLOG_EVERY_N(severity, n) LOG_EVERY_N(severity, n)
|
||||
#define DLOG_IF_EVERY_N(severity, condition, n) \
|
||||
LOG_IF_EVERY_N(severity, condition, n)
|
||||
#define DLOG_FIRST_N(severity, n) LOG_FIRST_N(severity, n)
|
||||
#define DLOG_EVERY_T(severity, T) LOG_EVERY_T(severity, T)
|
||||
#define DLOG_ASSERT(condition) LOG_ASSERT(condition)
|
||||
|
||||
// debug-only checking. executed if DCHECK_IS_ON().
|
||||
@ -1214,6 +1216,14 @@ const LogSeverity GLOG_0 = GLOG_ERROR;
|
||||
static_cast<void>(0), \
|
||||
(true || !(condition))? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & LOG(severity)
|
||||
|
||||
#define DLOG_FIRST_N(severity, n) \
|
||||
static_cast<void>(0), \
|
||||
true ? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & LOG(severity)
|
||||
|
||||
#define DLOG_EVERY_T(severity, T) \
|
||||
static_cast<void>(0), \
|
||||
true ? (void) 0 : @ac_google_namespace@::LogMessageVoidify() & LOG(severity)
|
||||
|
||||
#define DLOG_ASSERT(condition) \
|
||||
static_cast<void>(0), \
|
||||
true ? (void) 0 : LOG_ASSERT(condition)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user