pipewire: add environment variable for disabling journald logging

Logging to journald can be annoying at high debug levels, so add an easy
way to disable it.
This commit is contained in:
Pauli Virtanen 2021-04-05 14:34:56 +03:00
parent 68804a3082
commit eb396f1ea8
2 changed files with 7 additions and 3 deletions

View file

@ -40,6 +40,7 @@ applications:
* `PIPEWIRE_DEBUG=<level>` to increase the debug level
* `PIPEWIRE_LOG=<filename>` to redirect log to filename
* `PIPEWIRE_LOG_SYSTEMD=false` to disable logging to systemd journal
* `PIPEWIRE_LATENCY=<num/denom>` to configure latency as a fraction. 10/1000
configures a 10ms latency. Usually this is
expressed as a fraction of the samplerate,

View file

@ -441,9 +441,12 @@ void pw_init(int *argc, char **argv[])
pw_log_set(log);
#ifdef HAVE_SYSTEMD
log = load_journal_logger(support);
if (log)
pw_log_set(log);
if ((str = getenv("PIPEWIRE_LOG_SYSTEMD")) == NULL ||
strcmp(str, "true") == 0 || atoi(str) != 0) {
log = load_journal_logger(support);
if (log)
pw_log_set(log);
}
#endif
} else {
support->support[support->n_support++] =