clean up logging, allow user to specify log files

If DebugLogFile is specified, log to it at -l debug
If LogFile is specified, log to it at the -l from the commandline
  (default info)
If no LogFile *and* not a Daemon, then log to stdout.
Make conn->s = -1 by default (this might break things)
When kill -USR1, prefer to log at INFO, but make sure they always see it.


svn:r596
This commit is contained in:
Roger Dingledine
2003-10-15 18:50:16 +00:00
parent 695920d09f
commit 11a23fc280
6 changed files with 21 additions and 13 deletions
-5
View File
@@ -75,11 +75,6 @@ logv(int severity, const char *funcname, const char *format, va_list ap)
assert(format);
if (severity < loglevel)
return;
if (!logfiles) {
/* XXX This is a temporary measure until we get configuration support
for logfiles. */
add_stream_log(loglevel, "<stdout>", stdout);
}
for (lf = logfiles; lf; lf = lf->next) {
if (severity < lf->loglevel || severity > lf->max_loglevel)
continue;