From cabcaf2174b1a2e0c714f8a9ca56ff3ab2ed95d4 Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Fri, 17 May 2013 22:28:03 -0400 Subject: [PATCH] [server] apply same logging policy for --fw-* modes as --foreground mode --- server/log_msg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/log_msg.c b/server/log_msg.c index 48d6950b..98d4d447 100644 --- a/server/log_msg.c +++ b/server/log_msg.c @@ -97,9 +97,13 @@ init_logging(fko_srv_options_t *opts) { else strlcpy(log_name, my_name, strlen(MY_NAME)+1); - /* If we are running in the foreground, all logging will go to stderr. + /* If we are running in the foreground or performing firewall operations, + * all logging will go to stderr. */ - if(opts->foreground != 0) + if(opts->foreground != 0 + || opts->fw_flush != 0 + || opts->fw_list != 0 + || opts->fw_list_all != 0) static_log_flag = LOG_STDERR | LOG_STDERR_ONLY; /* Parse the log facility as specified in the config struct. If, for some