From 2379e83283dfdced666a69265946ff54b95e4cec Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 15 Apr 2024 15:39:50 +0200 Subject: [PATCH] pipewire: document and improve -v option Take the log level after we init pipewire to get the default level. Then let the -v option increase it. Fixes #3963 --- src/daemon/pipewire.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/daemon/pipewire.c b/src/daemon/pipewire.c index 72a3aaebc..9193d817b 100644 --- a/src/daemon/pipewire.c +++ b/src/daemon/pipewire.c @@ -28,6 +28,7 @@ static void show_help(const char *name, const char *config_name) { fprintf(stdout, _("%s [options]\n" " -h, --help Show this help\n" + " -v, --verbose Increase verbosity by one level\n" " --version Show version\n" " -c, --config Load config (Default %s)\n" " -P --properties Set context properties\n"), @@ -52,7 +53,7 @@ int main(int argc, char *argv[]) int c, res = 0; char path[PATH_MAX]; const char *config_name; - enum spa_log_level level = pw_log_level; + enum spa_log_level level; struct spa_error_location loc; if (setenv("PIPEWIRE_INTERNAL", "1", 1) < 0) @@ -64,6 +65,8 @@ int main(int argc, char *argv[]) setlocale(LC_ALL, ""); pw_init(&argc, &argv); + level = pw_log_level; + properties = pw_properties_new( PW_KEY_CONFIG_NAME, config_name, NULL);