pipewire: don't log the location if PIPEWIRE_LOG_LINE=false

Default remains enabled, but sometimes it's easier to not have this.
This commit is contained in:
Peter Hutterer 2021-09-27 15:24:01 +10:00 committed by Wim Taymans
parent 9a6b929eb1
commit 92c7c8354d
2 changed files with 3 additions and 1 deletions

View file

@ -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=<filename>`: redirect the log to the given filename
- `PIPEWIRE_LOG_LINE=false`: don't log filename, function, and source code line
*/

View file

@ -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)