From 5aea6252b454fcf1506b54e8fb5f5ccbe8d2daff Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Thu, 14 May 2020 16:54:53 +0300 Subject: [PATCH] log: don't re-initialize the log level in pw_init() This allows setting the log level without setting PIPEWIRE_DEBUG prior to pw_init(). Setting it after is also possible, but we get to miss some messages that are printed from pw_init() --- src/pipewire/log.c | 2 +- src/pipewire/pipewire.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pipewire/log.c b/src/pipewire/log.c index 9e23cfbbd..dba6715e1 100644 --- a/src/pipewire/log.c +++ b/src/pipewire/log.c @@ -34,7 +34,7 @@ SPA_LOG_IMPL(default_log); -#define DEFAULT_LOG_LEVEL SPA_LOG_LEVEL_ERROR +#define DEFAULT_LOG_LEVEL SPA_LOG_LEVEL_WARN SPA_EXPORT enum spa_log_level pw_log_level = DEFAULT_LOG_LEVEL; diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c index ee879a5b9..7bffec223 100644 --- a/src/pipewire/pipewire.c +++ b/src/pipewire/pipewire.c @@ -368,8 +368,6 @@ void pw_init(int *argc, char **argv[]) if ((str = getenv("PIPEWIRE_DEBUG"))) configure_debug(support, str); - else - pw_log_set_level(SPA_LOG_LEVEL_WARN); if ((str = getenv("SPA_PLUGIN_DIR")) == NULL) str = PLUGINDIR;