command: add log.level property

Support setting the log level from the config file.
This commit is contained in:
Wim Taymans 2020-05-07 13:32:29 +02:00
parent 3712ebc434
commit 97c8e674ac
2 changed files with 6 additions and 0 deletions

View file

@ -126,6 +126,11 @@ static struct pw_command *parse_command_set_prop(struct pw_properties *propertie
pw_log_debug("set property: '%s' = '%s'", this->args[1], this->args[2]); pw_log_debug("set property: '%s' = '%s'", this->args[1], this->args[2]);
pw_properties_set(properties, this->args[1], this->args[2]); pw_properties_set(properties, this->args[1], this->args[2]);
if (strcmp(this->args[1], SPA_KEY_LOG_LEVEL) == 0) {
pw_log_set_level(atoi(this->args[2]));
setenv("PIPEWIRE_DEBUG", this->args[2], 1);
}
return this; return this;
error_arguments: error_arguments:

View file

@ -7,6 +7,7 @@
#set-prop link.max-buffers 64 #set-prop link.max-buffers 64
set-prop link.max-buffers 16 # version < 3 clients can't handle more set-prop link.max-buffers 16 # version < 3 clients can't handle more
#set-prop mem.allow-mlock true #set-prop mem.allow-mlock true
#set-prop log.level 2
## Properties for the DSP configuration ## Properties for the DSP configuration
# #