From f1b91924b2aef4304c02c7178c486295d45065f1 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 11 Feb 2006 21:56:03 +0000 Subject: Keep running if we ask for an impossible stdout log; just warn. svn:r5964 --- doc/TODO | 2 +- src/or/config.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/TODO b/doc/TODO index b16cd912d4..85b37ad939 100644 --- a/doc/TODO +++ b/doc/TODO @@ -64,7 +64,7 @@ R - Clients use it. (But not till the directories have upgraded!) - make log entries include function names in win32 again. - Make "setconf" and "hup" behavior cleaner for LINELIST config options (e.g. Log). Bug 238. - - "options_init_logs(): Can't log to stdout with RunAsDaemon set." + o "options_init_logs(): Can't log to stdout with RunAsDaemon set." - Were we going to load unrecognized 'state' variables into some list somewhere, and write them out whenever we update the state? To be forwards and backwards compatible. diff --git a/src/or/config.c b/src/or/config.c index f177012d85..d97d8c4b7e 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -2769,10 +2769,11 @@ options_init_logs(or_options_t *options, int validate_only) if (smartlist_len(elts) < 2) { /* only loglevels were provided */ if (!validate_only) { if (daemon) { - warn(LD_CONFIG, "Can't log to stdout with RunAsDaemon set."); - ok = 0; goto cleanup; + warn(LD_CONFIG, + "Can't log to stdout with RunAsDaemon set; skipping stdout"); + } else { + add_stream_log(levelMin, levelMax, "", stdout); } - add_stream_log(levelMin, levelMax, "", stdout); } goto cleanup; } -- cgit v1.2.3-54-g00ecf