mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
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
This commit is contained in:
parent
b9fad5b89c
commit
2379e83283
1 changed files with 4 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ static void show_help(const char *name, const char *config_name)
|
||||||
{
|
{
|
||||||
fprintf(stdout, _("%s [options]\n"
|
fprintf(stdout, _("%s [options]\n"
|
||||||
" -h, --help Show this help\n"
|
" -h, --help Show this help\n"
|
||||||
|
" -v, --verbose Increase verbosity by one level\n"
|
||||||
" --version Show version\n"
|
" --version Show version\n"
|
||||||
" -c, --config Load config (Default %s)\n"
|
" -c, --config Load config (Default %s)\n"
|
||||||
" -P --properties Set context properties\n"),
|
" -P --properties Set context properties\n"),
|
||||||
|
|
@ -52,7 +53,7 @@ int main(int argc, char *argv[])
|
||||||
int c, res = 0;
|
int c, res = 0;
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
const char *config_name;
|
const char *config_name;
|
||||||
enum spa_log_level level = pw_log_level;
|
enum spa_log_level level;
|
||||||
struct spa_error_location loc;
|
struct spa_error_location loc;
|
||||||
|
|
||||||
if (setenv("PIPEWIRE_INTERNAL", "1", 1) < 0)
|
if (setenv("PIPEWIRE_INTERNAL", "1", 1) < 0)
|
||||||
|
|
@ -64,6 +65,8 @@ int main(int argc, char *argv[])
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
pw_init(&argc, &argv);
|
pw_init(&argc, &argv);
|
||||||
|
|
||||||
|
level = pw_log_level;
|
||||||
|
|
||||||
properties = pw_properties_new(
|
properties = pw_properties_new(
|
||||||
PW_KEY_CONFIG_NAME, config_name,
|
PW_KEY_CONFIG_NAME, config_name,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue