implement VLOG(x)
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
DEFINE_int32(log_level, 0, "Log level (0 is the default).");
|
||||
|
||||
namespace operations_research {
|
||||
DateLogger::DateLogger() {
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
@@ -17,8 +17,11 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <iostream> // NOLINT
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/macros.h"
|
||||
|
||||
DECLARE_int32(log_level);
|
||||
|
||||
// Debug-only checking.
|
||||
#define DCHECK(condition) assert(condition)
|
||||
#define DCHECK_EQ(val1, val2) assert((val1) == (val2))
|
||||
@@ -45,7 +48,7 @@
|
||||
#define LOG_FATAL LogMessageFatal(__FILE__, __LINE__)
|
||||
#define LOG_QFATAL LOG_FATAL
|
||||
|
||||
#define VLOG(x) if ((x) <= 0) LOG_INFO.stream()
|
||||
#define VLOG(x) if ((x) <= FLAGS_log_level) LOG_INFO.stream()
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define DEBUG_MODE 0
|
||||
|
||||
Reference in New Issue
Block a user