From: Jaroslav Kysela Date: Fri, 1 May 2015 16:14:03 +0000 (+0200) Subject: main: add -S or --nosyslog option to disable completely syslog logging, fixes #2787 X-Git-Tag: v4.1~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0630fa4582854aff0ea09fa236e9ff10eed9222;p=thirdparty%2Ftvheadend.git main: add -S or --nosyslog option to disable completely syslog logging, fixes #2787 --- diff --git a/src/main.c b/src/main.c index ed06ff307..95784a22c 100644 --- a/src/main.c +++ b/src/main.c @@ -600,6 +600,7 @@ main(int argc, char **argv) opt_firstrun = 0, opt_stderr = 0, opt_syslog = 0, + opt_nosyslog = 0, opt_uidebug = 0, opt_abort = 0, opt_noacl = 0, @@ -687,6 +688,7 @@ main(int argc, char **argv) { 0, NULL, "Debug Options", OPT_BOOL, NULL }, { 'd', "stderr", "Enable debug on stderr", OPT_BOOL, &opt_stderr }, { 's', "syslog", "Enable debug to syslog", OPT_BOOL, &opt_syslog }, + { 'S', "nosyslog", "Disable syslog (all msgs)", OPT_BOOL, &opt_nosyslog }, { 'l', "logfile", "Enable debug to file", OPT_STR, &opt_logpath }, { 0, "debug", "Enable debug subsystems", OPT_STR, &opt_log_debug }, #if ENABLE_TRACE @@ -819,6 +821,8 @@ main(int argc, char **argv) if (opt_logpath) log_options |= TVHLOG_OPT_DBG_FILE; } + if (opt_nosyslog) + log_options &= ~(TVHLOG_OPT_SYSLOG|TVHLOG_OPT_DBG_SYSLOG); if (opt_fileline) log_options |= TVHLOG_OPT_FILELINE; if (opt_threadid)