diff --git a/src/debug.cpp b/src/debug.cpp index a26f58d46..f113a1c23 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -244,10 +244,6 @@ bool parse_log_cfg(const char *conf_str, *show_timestamps = LOG_TIMESTAMP_DISABLED; } - if (getenv("ULTRAGRID_VERBOSE") != nullptr) { - *log_lvl = LOG_LEVEL_VERBOSE; - } - if (cfg.empty() || cfg[0] == '+' || cfg[0] == '-') { // only flags, no log level return true; } diff --git a/src/host.cpp b/src/host.cpp index 04d32d1ce..acdaf6a5e 100644 --- a/src/host.cpp +++ b/src/host.cpp @@ -304,8 +304,9 @@ static bool parse_opts_set_logging(int argc, char *argv[]) // of argv arguments - we do not have the whole option set in optstring, so it // would put optargs to the end ("uv -t testcard -V" -> "uv -t -V testcard") - int logging_lvl = LOG_LEVEL_INFO; + int logging_lvl = getenv("ULTRAGRID_VERBOSE") != nullptr ? LOG_LEVEL_VERBOSE : LOG_LEVEL_INFO; bool logger_skip_repeats = true; + log_timestamp_mode logger_show_timestamps = LOG_TIMESTAMP_AUTO; for (int i = 1; i < argc; ++i) {