mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-06 16:56:00 +00:00
daemon: only call pw_log_set_level() if -v is actually given
Previous commit69e935e
unconditionally called pw_log_set_level() after the option parsing. If pw_init() changed the logging level based on PIPEWIRE_DEBUG, we'd now overwrite that change. Call pw_log_set_level() only if -v is actually given on the commandline. This means a commandline option will override PIPEWIRE_DEBUG if set but that is intended. Fixes69e935e8a4
This commit is contained in:
parent
69e935e8a4
commit
40487e485d
|
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
|||
switch (c) {
|
||||
case 'v':
|
||||
if (level < SPA_LOG_LEVEL_TRACE)
|
||||
level++;
|
||||
pw_log_set_level(++level);
|
||||
break;
|
||||
case 'h':
|
||||
show_help(argv[0], config_name);
|
||||
|
@ -101,7 +101,6 @@ int main(int argc, char *argv[])
|
|||
goto done;
|
||||
}
|
||||
}
|
||||
pw_log_set_level(level);
|
||||
|
||||
properties = pw_properties_new(
|
||||
PW_KEY_CONFIG_NAME, config_name,
|
||||
|
|
|
@ -2455,7 +2455,7 @@ int main(int argc, char *argv[])
|
|||
switch (c) {
|
||||
case 'v':
|
||||
if (level < SPA_LOG_LEVEL_TRACE)
|
||||
level++;
|
||||
pw_log_set_level(++level);
|
||||
break;
|
||||
case 'h':
|
||||
do_show_help = true;
|
||||
|
@ -2475,7 +2475,6 @@ int main(int argc, char *argv[])
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
pw_log_set_level(level);
|
||||
|
||||
impl.this.props = pw_properties_new(
|
||||
PW_KEY_CONFIG_PREFIX, SESSION_PREFIX,
|
||||
|
|
Loading…
Reference in a new issue