From: Andre Noll Date: Sat, 17 Apr 2010 12:43:00 +0000 (+0200) Subject: Use logfile only for --run --daemon. X-Git-Tag: v0.1.5~20^2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=c279f1a5bd474f002f8486aafbfd0b7f0d4e15c3;p=dss.git Use logfile only for --run --daemon. In all other cases it does not really make sense, so it is better to write log output to stderr in these cases, even if --logfile was given. --- diff --git a/dss.c b/dss.c index 531beb6..e32e7e2 100644 --- a/dss.c +++ b/dss.c @@ -884,7 +884,7 @@ static int parse_config_file(int override) conf.logfile_given = 1; } } - if (conf.logfile_given) { + if (conf.logfile_given && conf.run_given && conf.daemon_given) { logfile = open_log(conf.logfile_arg); log_welcome(conf.loglevel_arg); } diff --git a/dss.ggo b/dss.ggo index 7934db3..8f1ec5c 100644 --- a/dss.ggo +++ b/dss.ggo @@ -77,9 +77,10 @@ option "logfile" - "Logfile for the dss daemon process" string typestr="filename" optional -details=" - This option is mostly useful for the run command if --daemon - is also given. +details = " + This option is only honored if both --run and --daemon are + given. Otherwise it is silently ignored and log output is + written to stderr. " ##################