summaryrefslogtreecommitdiff
path: root/src/logging.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/logging.cc')
-rw-r--r--src/logging.cc78
1 files changed, 39 insertions, 39 deletions
diff --git a/src/logging.cc b/src/logging.cc
index aa32f26..868898f 100644
--- a/src/logging.cc
+++ b/src/logging.cc
@@ -89,15 +89,15 @@ static bool BoolFromEnv(const char *varname, bool defval) {
return memchr("tTyY1\0", valstr[0], 6) != NULL;
}
-DEFINE_bool(logtostderr, BoolFromEnv("GOOGLE_LOGTOSTDERR", false),
- "log messages go to stderr instead of logfiles");
-DEFINE_bool(alsologtostderr, BoolFromEnv("GOOGLE_ALSOLOGTOSTDERR", false),
- "log messages go to stderr in addition to logfiles");
+GLOG_DEFINE_bool(logtostderr, BoolFromEnv("GOOGLE_LOGTOSTDERR", false),
+ "log messages go to stderr instead of logfiles");
+GLOG_DEFINE_bool(alsologtostderr, BoolFromEnv("GOOGLE_ALSOLOGTOSTDERR", false),
+ "log messages go to stderr in addition to logfiles");
#ifdef OS_LINUX
-DEFINE_bool(drop_log_memory, true, "Drop in-memory buffers of log contents. "
- "Logs can grow very quickly and they are rarely read before they "
- "need to be evicted from memory. Instead, drop them from memory "
- "as soon as they are flushed to disk.");
+GLOG_DEFINE_bool(drop_log_memory, true, "Drop in-memory buffers of log contents. "
+ "Logs can grow very quickly and they are rarely read before they "
+ "need to be evicted from memory. Instead, drop them from memory "
+ "as soon as they are flushed to disk.");
_START_GOOGLE_NAMESPACE_
namespace logging {
static const int64 kPageSize = getpagesize();
@@ -115,25 +115,25 @@ DEFINE_int32(stderrthreshold,
"log messages at or above this level are copied to stderr in "
"addition to logfiles. This flag obsoletes --alsologtostderr.");
-DEFINE_string(alsologtoemail, "",
- "log messages go to these email addresses "
- "in addition to logfiles");
-DEFINE_bool(log_prefix, true,
- "Prepend the log prefix to the start of each log line");
-DEFINE_int32(minloglevel, 0, "Messages logged at a lower level than this don't "
- "actually get logged anywhere");
-DEFINE_int32(logbuflevel, 0,
- "Buffer log messages logged at this level or lower"
- " (-1 means don't buffer; 0 means buffer INFO only;"
- " ...)");
-DEFINE_int32(logbufsecs, 30,
- "Buffer log messages for at most this many seconds");
-DEFINE_int32(logemaillevel, 999,
- "Email log messages logged at this level or higher"
- " (0 means email all; 3 means email FATAL only;"
- " ...)");
-DEFINE_string(logmailer, "/bin/mail",
- "Mailer used to send logging email");
+GLOG_DEFINE_string(alsologtoemail, "",
+ "log messages go to these email addresses "
+ "in addition to logfiles");
+GLOG_DEFINE_bool(log_prefix, true,
+ "Prepend the log prefix to the start of each log line");
+GLOG_DEFINE_int32(minloglevel, 0, "Messages logged at a lower level than this don't "
+ "actually get logged anywhere");
+GLOG_DEFINE_int32(logbuflevel, 0,
+ "Buffer log messages logged at this level or lower"
+ " (-1 means don't buffer; 0 means buffer INFO only;"
+ " ...)");
+GLOG_DEFINE_int32(logbufsecs, 30,
+ "Buffer log messages for at most this many seconds");
+GLOG_DEFINE_int32(logemaillevel, 999,
+ "Email log messages logged at this level or higher"
+ " (0 means email all; 3 means email FATAL only;"
+ " ...)");
+GLOG_DEFINE_string(logmailer, "/bin/mail",
+ "Mailer used to send logging email");
// Compute the default value for --log_dir
static const char* DefaultLogDir() {
@@ -149,21 +149,21 @@ static const char* DefaultLogDir() {
return "";
}
-DEFINE_string(log_dir, DefaultLogDir(),
- "If specified, logfiles are written into this directory instead "
- "of the default logging directory.");
-DEFINE_string(log_link, "", "Put additional links to the log "
- "files in this directory");
+GLOG_DEFINE_string(log_dir, DefaultLogDir(),
+ "If specified, logfiles are written into this directory instead "
+ "of the default logging directory.");
+GLOG_DEFINE_string(log_link, "", "Put additional links to the log "
+ "files in this directory");
-DEFINE_int32(max_log_size, 1800,
- "approx. maximum log file size (in MB). A value of 0 will "
- "be silently overridden to 1.");
+GLOG_DEFINE_int32(max_log_size, 1800,
+ "approx. maximum log file size (in MB). A value of 0 will "
+ "be silently overridden to 1.");
-DEFINE_bool(stop_logging_if_full_disk, false,
- "Stop attempting to log to disk if the disk is full.");
+GLOG_DEFINE_bool(stop_logging_if_full_disk, false,
+ "Stop attempting to log to disk if the disk is full.");
-DEFINE_string(log_backtrace_at, "",
- "Emit a backtrace when logging at file:linenum.");
+GLOG_DEFINE_string(log_backtrace_at, "",
+ "Emit a backtrace when logging at file:linenum.");
// TODO(hamaji): consider windows
#define PATH_SEPARATOR '/'