From: Alberto Leiva Popper Date: Mon, 4 Dec 2023 20:56:54 +0000 (-0300) Subject: Remove the log switching cacophony on startup X-Git-Tag: 1.6.1~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d97b71b614f65d1c78346c81730701e54182999;p=thirdparty%2FFORT-validator.git Remove the log switching cacophony on startup Resolves the first complaint of #103: > I believe that if syslog output is enabled on the command line then > fort should be able to not report these useless messages about > switching the output back and forward. > > Also, there is no point in reporting in syslog that messages are > being sent to syslog and on the console that messages are being sent > to the console because this is self-evident. Looking back at the history, it seems these messages were born because a long time ago, sys-logging was hardcoded to "server" mode, while console "logging" was tied to "standalone" mode. Default was "server," which meant a newcomer who managed to kickstart Fort in the foreground with minimal arguments ended up with a validator that, on account of looking silent, seemed to be doing absolutely nothing. Given than logmode and runmode are completely independent now, and log output defaults to "console," it would appear that these messages are, as a matter of fact, completely useless. --- diff --git a/src/log.c b/src/log.c index b56facd9..9813f468 100644 --- a/src/log.c +++ b/src/log.c @@ -264,19 +264,13 @@ log_start(void) if (config_get_val_log_enabled()) { switch (config_get_val_log_output()) { case SYSLOG: - pr_op_info("Syslog log output configured; disabling validation logging on standard streams."); - pr_op_info("(Validation Logs will be sent to syslog only.)"); val_config.fprintf_enabled = false; break; case CONSOLE: - pr_op_info("Console log output configured; disabling validation logging on syslog."); - pr_op_info("(Validation Logs will be sent to the standard streams only.)"); val_config.syslog_enabled = false; break; } } else { - pr_op_info("Disabling validation logging on syslog."); - pr_op_info("Disabling validation logging on standard streams."); val_config.fprintf_enabled = false; val_config.syslog_enabled = false; } @@ -284,13 +278,9 @@ log_start(void) if (config_get_op_log_enabled()) { switch (config_get_op_log_output()) { case SYSLOG: - pr_op_info("Syslog log output configured; disabling operation logging on standard streams."); - pr_op_info("(Operation Logs will be sent to syslog only.)"); op_config.fprintf_enabled = false; break; case CONSOLE: - pr_op_info("Console log output configured; disabling operation logging on syslog."); - pr_op_info("(Operation Logs will be sent to the standard streams only.)"); if (val_config.syslog_enabled) op_config.syslog_enabled = false; else @@ -298,8 +288,6 @@ log_start(void) break; } } else { - pr_op_info("Disabling operation logging on syslog."); - pr_op_info("Disabling operation logging on standard streams."); op_config.fprintf_enabled = false; if (val_config.syslog_enabled) op_config.syslog_enabled = false;