mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
pipewire: also set journal log level
This commit is contained in:
parent
04aa5472d3
commit
38763da20f
1 changed files with 8 additions and 1 deletions
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue