mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
journal: make it possible to set level from info
This commit is contained in:
parent
cb203e38c3
commit
04aa5472d3
1 changed files with 6 additions and 0 deletions
|
|
@ -195,6 +195,7 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
uint32_t n_support)
|
||||
{
|
||||
struct impl *impl;
|
||||
const char *str;
|
||||
|
||||
spa_return_val_if_fail(factory != NULL, -EINVAL);
|
||||
spa_return_val_if_fail(handle != NULL, -EINVAL);
|
||||
|
|
@ -210,6 +211,11 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
&impl_log, impl);
|
||||
impl->log.level = DEFAULT_LOG_LEVEL;
|
||||
|
||||
if (info) {
|
||||
if ((str = spa_dict_lookup(info, SPA_KEY_LOG_LEVEL)) != NULL)
|
||||
impl->log.level = atoi(str);
|
||||
}
|
||||
|
||||
/* if our stderr goes to the journal, there's no point in logging both
|
||||
* via the native journal API and by printing to stderr, that would just
|
||||
* result in message duplication */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue