Browse Source

Update log documentation

svn:r2691
Nick Mathewson 21 years ago
parent
commit
f490e5cdb6
3 changed files with 19 additions and 23 deletions
  1. 12 14
      doc/tor.1.in
  2. 6 8
      src/config/torrc.sample.in
  3. 1 1
      src/or/config.c

+ 12 - 14
doc/tor.1.in

@@ -28,16 +28,18 @@ Other options can be specified either on the commandline (\fI--option
 value\fR), or in the configuration file (\fIoption value\fR).
 value\fR), or in the configuration file (\fIoption value\fR).
 Options are case-insensitive.
 Options are case-insensitive.
 .TP
 .TP
-\fBLogLevel debug|info|notice|warn|err\fP
-Set the verboseness level of the primary log.  (Default: warn.  Abbreviation:
--l.)
-.TP
-\fBLogFile \fR\fIFILE\fP
-Rather than logging to stdout, log to FILE.
-.TP
-\fBSysLog 1\fP
-Rather than logging to stdout, send messages to the system log. (Not
-supported on all platforms)
+\fBLog \fR\fIminSeverity\fR-\fImaxSeverity\fR \fBstderr\fR|\fBstdout\fR|\fBsyslog\fR\fP
+Send all messages between \fIminSeverity\fR and \fImaxSeverity\fR to
+the standard output stream, the standard error strem, or to the system
+log. (The "syslog" value is only supported on Unix.)  Recognized
+severity levels are debug, info, notice, warn, and err.  If only one
+severity level is given, all messages of that level or higher will be
+sent to the listed destination.
+.TP
+\fBLog \fR\fIminSeverity\fR-\fImaxSeverity\fR \fBfile\fR \fIFILENAME\fP
+As above, but send log messages to the listed filename.  The "Log"
+option may appear more than once in a configuration file.  Messages
+messaes are sent to all the logs that match their severity level.
 .TP
 .TP
 \fBBandwidthRate \fR\fINUM\fP
 \fBBandwidthRate \fR\fINUM\fP
 A token bucket limits the average incoming bandwidth on this node to NUM bytes per second. (Default: 800000)
 A token bucket limits the average incoming bandwidth on this node to NUM bytes per second. (Default: 800000)
@@ -52,10 +54,6 @@ be repeated many times, for multiple authoritative directory
 servers. If no \fBdirserver\fP line is given, Tor will use the default
 servers. If no \fBdirserver\fP line is given, Tor will use the default
 directory servers: moria1, moria2, and tor26.
 directory servers: moria1, moria2, and tor26.
 .TP
 .TP
-\fBDebugLogFile \fR\fIFILE\fP
-In addition to other logging, we will log to FILE at log-level debug.
-(Deprecated; use LogFile and LogLevel instead.)
-.TP
 \fBGroup \fR\fIGID\fP
 \fBGroup \fR\fIGID\fP
 On startup, setgid to this user.
 On startup, setgid to this user.
 .TP
 .TP

+ 6 - 8
src/config/torrc.sample.in

@@ -20,17 +20,15 @@ AllowUnverifiedNodes middle,rendezvous
 # Logs go to stdout unless redirected by something else, like one of
 # Logs go to stdout unless redirected by something else, like one of
 # the below lines, or --logfile on the command line.
 # the below lines, or --logfile on the command line.
 ### Send all messages of level 'warn' or higher to @LOCALSTATEDIR@/log/tor/warnings
 ### Send all messages of level 'warn' or higher to @LOCALSTATEDIR@/log/tor/warnings
-#LogFile @LOCALSTATEDIR@/log/tor/warnings
-#LogLevel warn
+#Log warn file @LOCALSTATEDIR@/log/tor/warnings
 ### Send all debug and info messages to @LOCALSTATEDIR@/log/tor/debug
 ### Send all debug and info messages to @LOCALSTATEDIR@/log/tor/debug
-#LogFile @LOCALSTATEDIR@/log/tor/debug
-#LogLevel debug-info
+#Log debug-info file @LOCALSTATEDIR@/log/tor/debug
 ### Send all debug messages ONLY to @LOCALSTATEDIR@/log/tor/debug
 ### Send all debug messages ONLY to @LOCALSTATEDIR@/log/tor/debug
-#LogFile @LOCALSTATEDIR@/log/tor/debug
-#LogLevel debug-debug
+#Log debug-debug file @LOCALSTATEDIR@/log/tor/debug
 ### To use the system log instead of Tor's logfiles, uncomment these lines:
 ### To use the system log instead of Tor's logfiles, uncomment these lines:
-#SysLog
-#LogLevel notice
+#Log notice syslog
+### To send all messages to stderr:
+#Log debug-err stderr
 
 
 # Uncomment this to start the process in the background... or use
 # Uncomment this to start the process in the background... or use
 # --runasdaemon 1 on the command line.
 # --runasdaemon 1 on the command line.

+ 1 - 1
src/or/config.c

@@ -1231,7 +1231,7 @@ parse_log_severity_range(const char *range, int *min_out, int *max_out)
              "err|warn|notice|info|debug", range);
              "err|warn|notice|info|debug", range);
       return -1;
       return -1;
     }
     }
-    levelMax = levelMin;
+    levelMax = LOG_ERR;
   }
   }
 
 
   *min_out = levelMin;
   *min_out = levelMin;