diff options
author | Roger Dingledine <arma@torproject.org> | 2004-12-07 06:27:39 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-12-07 06:27:39 +0000 |
commit | 2ff38fdf83389604f35f0266fcb96402c2130c57 (patch) | |
tree | b191734b331be3b7689b881132c923a55aa2b305 /src | |
parent | f2bf364df9e2f701d41c59e3f7a879d12e3d42d1 (diff) | |
download | tor-2ff38fdf83389604f35f0266fcb96402c2130c57.tar.gz tor-2ff38fdf83389604f35f0266fcb96402c2130c57.zip |
when recommending new-format log lines, if the upper bound is LOG_ERR,
leave it implicit.
svn:r3097
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c index 63e70ead16..a7aaf023a5 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1170,7 +1170,7 @@ options_validate(or_options_t *options) /* Special case if no options are given. */ if (!options->Logs) { - options->Logs = config_line_prepend(NULL, "Log", "notice-err stdout"); + options->Logs = config_line_prepend(NULL, "Log", "notice stdout"); } if (config_init_logs(options, 1)<0) /* Validate the log(s) */ @@ -1896,10 +1896,11 @@ add_single_log_option(or_options_t *options, int minSeverity, int maxSeverity, char buf[512]; int n; - n = tor_snprintf(buf, sizeof(buf), "%s-%s %s%s%s", + n = tor_snprintf(buf, sizeof(buf), "%s%s%s %s%s%s", log_level_to_string(minSeverity), - log_level_to_string(maxSeverity), - type, fname?" ":"", fname?fname:""); + maxSeverity == LOG_ERR ? "" : "-", + maxSeverity == LOG_ERR ? "" : log_level_to_string(maxSeverity), + type, fname?" ":"", fname?fname:""); if (n<0) { log_fn(LOG_WARN, "Normalized log option too long."); return -1; |