diff --git a/doc/pipewire-daemon.dox b/doc/pipewire-daemon.dox index 0c0aa03a6..665fe53b5 100644 --- a/doc/pipewire-daemon.dox +++ b/doc/pipewire-daemon.dox @@ -149,5 +149,6 @@ The behavior of the logging can be further controlled with the following environment variables: - `PIPEWIRE_LOG_SYSTEMD=false`: disable logging to the systemd journal - `PIPEWIRE_LOG=`: redirect the log to the given filename +- `PIPEWIRE_LOG_LINE=false`: don't log filename, function, and source code line */ diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c index 436a7f5f6..6c3479c49 100644 --- a/src/pipewire/pipewire.c +++ b/src/pipewire/pipewire.c @@ -567,7 +567,8 @@ void pw_init(int *argc, char **argv[]) if (!support->no_color) items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_COLORS, "true"); items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_TIMESTAMP, "true"); - items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_LINE, "true"); + if ((str = getenv("PIPEWIRE_LOG_LINE")) == NULL || spa_atob(str)) + items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_LINE, "true"); snprintf(level, sizeof(level), "%d", pw_log_level); items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_LOG_LEVEL, level); if ((str = getenv("PIPEWIRE_LOG")) != NULL)