From 20a331fad1bb2c608d70be07a3cca455ed37a141 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 7 Mar 2023 16:31:00 +0100 Subject: [PATCH] logging: do not override log_level default val If user didn't set anything on command line, do not override the default value of `log_level` specified by the initializer. This is a bit contraintuitive if a developer sets the value ad hoc to a different val, it won't take effect. --- src/host.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host.cpp b/src/host.cpp index b31bd3ff7..36290458b 100644 --- a/src/host.cpp +++ b/src/host.cpp @@ -331,7 +331,7 @@ static bool parse_opts_set_logging(int argc, char *argv[]) } opterr = saved_opterr; if (logging_lvl == 0) { - logging_lvl = getenv("ULTRAGRID_VERBOSE") != nullptr ? LOG_LEVEL_VERBOSE : LOG_LEVEL_INFO; + logging_lvl = getenv("ULTRAGRID_VERBOSE") != nullptr ? LOG_LEVEL_VERBOSE : log_level; } else { logging_lvl += LOG_LEVEL_INFO; }