mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
daemon: only call pw_log_set_level() if -v is actually given
Previous commit69e935eunconditionally 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
2 changed files with 2 additions and 4 deletions
|
|
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'v':
|
case 'v':
|
||||||
if (level < SPA_LOG_LEVEL_TRACE)
|
if (level < SPA_LOG_LEVEL_TRACE)
|
||||||
level++;
|
pw_log_set_level(++level);
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
show_help(argv[0], config_name);
|
show_help(argv[0], config_name);
|
||||||
|
|
@ -101,7 +101,6 @@ int main(int argc, char *argv[])
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pw_log_set_level(level);
|
|
||||||
|
|
||||||
properties = pw_properties_new(
|
properties = pw_properties_new(
|
||||||
PW_KEY_CONFIG_NAME, config_name,
|
PW_KEY_CONFIG_NAME, config_name,
|
||||||
|
|
|
||||||
|
|
@ -2455,7 +2455,7 @@ int main(int argc, char *argv[])
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'v':
|
case 'v':
|
||||||
if (level < SPA_LOG_LEVEL_TRACE)
|
if (level < SPA_LOG_LEVEL_TRACE)
|
||||||
level++;
|
pw_log_set_level(++level);
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
do_show_help = true;
|
do_show_help = true;
|
||||||
|
|
@ -2475,7 +2475,6 @@ int main(int argc, char *argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pw_log_set_level(level);
|
|
||||||
|
|
||||||
impl.this.props = pw_properties_new(
|
impl.this.props = pw_properties_new(
|
||||||
PW_KEY_CONFIG_PREFIX, SESSION_PREFIX,
|
PW_KEY_CONFIG_PREFIX, SESSION_PREFIX,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue