diff options
author | Roger Dingledine <arma@torproject.org> | 2004-01-05 05:22:04 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-01-05 05:22:04 +0000 |
commit | 607078cf7000ce3de1dedd38c7b51b49a044ee3a (patch) | |
tree | 9a476635b03f6796c20c18b513417f13a1f0e6e3 | |
parent | cacacfe2b1f147c81cb05ddd5c6163cf482d5bed (diff) | |
download | tor-607078cf7000ce3de1dedd38c7b51b49a044ee3a.tar tor-607078cf7000ce3de1dedd38c7b51b49a044ee3a.tar.gz |
print an entry at the top of the logfile so you know it's working
clean up a minor bug in a debugfile log entry
svn:r970
-rw-r--r-- | src/or/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c index 5b4c6a647..cf2800a85 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -403,15 +403,20 @@ static int init_from_config(int argc, char **argv) { close_logs(); /* we'll close, then open with correct loglevel if necessary */ if(!options.LogFile && !options.RunAsDaemon) add_stream_log(options.loglevel, "<stdout>", stdout); - if(options.LogFile) + if(options.LogFile) { if (add_file_log(options.loglevel, options.LogFile) != 0) { /* opening the log file failed! Use stderr and log a warning */ add_stream_log(options.loglevel, "<stderr>", stderr); log_fn(LOG_WARN, "Cannot write to LogFile '%s': %s.", options.LogFile, strerror(errno)); } - if(options.DebugLogFile) + log_fn(LOG_WARN, "Successfully opened LogFile '%s', redirecting output.", + options.LogFile); + } + if(options.DebugLogFile) { if (add_file_log(LOG_DEBUG, options.DebugLogFile) != 0) - log_fn(LOG_WARN, "Cannot write to DebugLogFile '%s': %s.", options.LogFile, strerror(errno)); + log_fn(LOG_WARN, "Cannot write to DebugLogFile '%s': %s.", options.DebugLogFile, strerror(errno)); + log_fn(LOG_DEBUG, "Successfully opened DebugLogFile '%s'.", options.DebugLogFile); + } global_read_bucket = options.TotalBandwidth; /* start it at 1 second of traffic */ stats_prev_global_read_bucket = global_read_bucket; |