MINOR: errors: does not check MODE_STARTING for log emission
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 9 Nov 2023 13:08:10 +0000 (14:08 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 9 Nov 2023 13:39:11 +0000 (14:39 +0100)
ha_alert(), ha_warning() and ha_notice() shouldn't check MODE_STARTING
for log emission. Let's remove the check.

This shouldn't do much since the stdio_quiet() function mute the output
in main().

src/errors.c

index bd157a8..8e3bc5b 100644 (file)
@@ -444,8 +444,7 @@ void ha_alert(const char *fmt, ...)
 {
        va_list argp;
 
-       if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE) ||
-           !(global.mode & MODE_STARTING)) {
+       if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) {
                warn_exec_path();
                va_start(argp, fmt);
                print_message(1, "ALERT", fmt, argp);
@@ -463,8 +462,7 @@ void ha_warning(const char *fmt, ...)
        warned |= WARN_ANY;
        HA_ATOMIC_INC(&tot_warnings);
 
-       if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE) ||
-           !(global.mode & MODE_STARTING)) {
+       if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) {
                warn_exec_path();
                va_start(argp, fmt);
                print_message(1, "WARNING", fmt, argp);
@@ -515,8 +513,7 @@ void ha_notice(const char *fmt, ...)
 {
        va_list argp;
 
-       if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE) ||
-           !(global.mode & MODE_STARTING)) {
+       if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) {
                va_start(argp, fmt);
                print_message(1, "NOTICE", fmt, argp);
                va_end(argp);