add a new log target that enables to create new log file if it exists

This commit is contained in:
Deng Zhengrong 2012-06-28 15:27:57 +08:00 committed by David Henningsson
parent 270b1a7d74
commit 508ca489d2
2 changed files with 35 additions and 2 deletions

View file

@ -141,7 +141,7 @@ void pa_cmdline_help(const char *argv0) {
" this time passed\n"
" --log-level[=LEVEL] Increase or set verbosity level\n"
" -v Increase the verbosity level\n"
" --log-target={auto,syslog,stderr,file:PATH}\n"
" --log-target={auto,syslog,stderr,file:PATH,newfile:PATH}\n"
" Specify the log target\n"
" --log-meta[=BOOL] Include code location in log messages\n"
" --log-time[=BOOL] Include timestamps in log messages\n"
@ -315,7 +315,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
case ARG_LOG_TARGET:
if (pa_daemon_conf_set_log_target(conf, optarg) < 0) {
pa_log(_("Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file name 'file:<path>'."));
pa_log(_("Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file name 'file:<path>', 'newfile:<path>'."));
goto fail;
}
break;