From a23312347352e2244bce51c615fbdbdc811f018a Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 28 Apr 2023 14:32:50 +0200 Subject: [PATCH] ULTRAGRID_VERBOSE env var: neutralize if empty While set, user may want to unset it just for one command, for which the easiest way is to use `ULTRAGRID_VERBOSE= `. --- src/host.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host.cpp b/src/host.cpp index a6bc7b49d..2bd323aa7 100644 --- a/src/host.cpp +++ b/src/host.cpp @@ -334,7 +334,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; + logging_lvl = getenv("ULTRAGRID_VERBOSE") != nullptr && strlen(getenv("ULTRAGRID_VERBOSE")) > 0 ? LOG_LEVEL_VERBOSE : log_level; } else { logging_lvl += LOG_LEVEL_INFO; }