mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 22:40:30 +00:00
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= <cmd>`.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user