[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] clean up logging, allow user to specify log files
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common
Modified Files:
log.c
Log Message:
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.
Index: log.c
===================================================================
RCS file: /home/or/cvsroot/src/common/log.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- log.c 15 Oct 2003 18:38:38 -0000 1.25
+++ log.c 15 Oct 2003 18:50:09 -0000 1.26
@@ -75,11 +75,6 @@
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;