mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
make log meta, time, backtrace configurable using command line
This commit is contained in:
parent
496499c0df
commit
16471915af
1 changed files with 27 additions and 0 deletions
|
|
@ -55,6 +55,9 @@ enum {
|
||||||
ARG_MODULE_IDLE_TIME,
|
ARG_MODULE_IDLE_TIME,
|
||||||
ARG_SCACHE_IDLE_TIME,
|
ARG_SCACHE_IDLE_TIME,
|
||||||
ARG_LOG_TARGET,
|
ARG_LOG_TARGET,
|
||||||
|
ARG_LOG_META,
|
||||||
|
ARG_LOG_TIME,
|
||||||
|
ARG_LOG_BACKTRACE,
|
||||||
ARG_LOAD,
|
ARG_LOAD,
|
||||||
ARG_FILE,
|
ARG_FILE,
|
||||||
ARG_DL_SEARCH_PATH,
|
ARG_DL_SEARCH_PATH,
|
||||||
|
|
@ -88,6 +91,9 @@ static const struct option long_options[] = {
|
||||||
{"module-idle-time", 2, 0, ARG_MODULE_IDLE_TIME},
|
{"module-idle-time", 2, 0, ARG_MODULE_IDLE_TIME},
|
||||||
{"scache-idle-time", 2, 0, ARG_SCACHE_IDLE_TIME},
|
{"scache-idle-time", 2, 0, ARG_SCACHE_IDLE_TIME},
|
||||||
{"log-target", 1, 0, ARG_LOG_TARGET},
|
{"log-target", 1, 0, ARG_LOG_TARGET},
|
||||||
|
{"log-meta", 2, 0, ARG_LOG_META},
|
||||||
|
{"log-time", 2, 0, ARG_LOG_TIME},
|
||||||
|
{"log-backtrace", 1, 0, ARG_LOG_BACKTRACE},
|
||||||
{"load", 1, 0, ARG_LOAD},
|
{"load", 1, 0, ARG_LOAD},
|
||||||
{"file", 1, 0, ARG_FILE},
|
{"file", 1, 0, ARG_FILE},
|
||||||
{"dl-search-path", 1, 0, ARG_DL_SEARCH_PATH},
|
{"dl-search-path", 1, 0, ARG_DL_SEARCH_PATH},
|
||||||
|
|
@ -148,6 +154,9 @@ void pa_cmdline_help(const char *argv0) {
|
||||||
" --log-level[=LEVEL] Increase or set verbosity level\n"
|
" --log-level[=LEVEL] Increase or set verbosity level\n"
|
||||||
" -v Increase the verbosity level\n"
|
" -v Increase the verbosity level\n"
|
||||||
" --log-target={auto,syslog,stderr} Specify the log target\n"
|
" --log-target={auto,syslog,stderr} Specify the log target\n"
|
||||||
|
" --log-meta[=BOOL] Include code location in log messages\n"
|
||||||
|
" --log-time[=BOOL] Include timestamps in log messages\n"
|
||||||
|
" --log-backtrace=FRAMES Include a backtrace in log messages\n"
|
||||||
" -p, --dl-search-path=PATH Set the search path for dynamic shared\n"
|
" -p, --dl-search-path=PATH Set the search path for dynamic shared\n"
|
||||||
" objects (plugins)\n"
|
" objects (plugins)\n"
|
||||||
" --resample-method=METHOD Use the specified resampling method\n"
|
" --resample-method=METHOD Use the specified resampling method\n"
|
||||||
|
|
@ -321,6 +330,24 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ARG_LOG_TIME:
|
||||||
|
if ((conf->log_time = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
|
||||||
|
pa_log(_("--log-time boolean argument"));
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ARG_LOG_META:
|
||||||
|
if ((conf->log_meta = optarg ? pa_parse_boolean(optarg) : TRUE) < 0) {
|
||||||
|
pa_log(_("--log-meta boolean argument"));
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ARG_LOG_BACKTRACE:
|
||||||
|
conf->log_backtrace = (unsigned) atoi(optarg);
|
||||||
|
break;
|
||||||
|
|
||||||
case ARG_EXIT_IDLE_TIME:
|
case ARG_EXIT_IDLE_TIME:
|
||||||
conf->exit_idle_time = atoi(optarg);
|
conf->exit_idle_time = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue