]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
when recommending new-format log lines, if the upper bound is LOG_ERR,
authorRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 06:27:39 +0000 (06:27 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 06:27:39 +0000 (06:27 +0000)
leave it implicit.

svn:r3097

src/or/config.c

index 63e70ead163c297145d7bfd8829202e0ef4e8508..a7aaf023a5edfa0e4b1159ee9dd553ea0ef9eb0f 100644 (file)
@@ -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;