pipewire: also set journal log level

This commit is contained in:
Wim Taymans 2020-11-18 17:43:24 +01:00
parent 04aa5472d3
commit 38763da20f

View file

@ -346,14 +346,21 @@ static struct spa_log *load_journal_logger(struct support *support)
struct spa_handle *handle;
void *iface = NULL;
int res = -ENOENT;
struct spa_dict info;
struct spa_dict_item items[1];
char level[32];
uint32_t i;
/* is the journal even available? */
if (access("/run/systemd/journal/socket", F_OK) != 0)
return NULL;
snprintf(level, sizeof(level), "%d", pw_log_level);
items[0] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_LEVEL, level);
info = SPA_DICT_INIT(items, 1);
handle = pw_load_spa_handle("support/libspa-journal",
SPA_NAME_SUPPORT_LOG, NULL,
SPA_NAME_SUPPORT_LOG, &info,
support->n_support, support->support);
if (handle == NULL ||