Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
main: add -n,--nostderr option
  • Loading branch information
perexg committed Nov 26, 2015
1 parent d1d9b8e commit 53f5856
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.c
Expand Up @@ -623,6 +623,7 @@ main(int argc, char **argv)
opt_fork = 0,
opt_firstrun = 0,
opt_stderr = 0,
opt_nostderr = 0,
opt_syslog = 0,
opt_nosyslog = 0,
opt_uidebug = 0,
Expand Down Expand Up @@ -715,6 +716,7 @@ main(int argc, char **argv)

{ 0, NULL, N_("Debug options"), OPT_BOOL, NULL },
{ 'd', "stderr", N_("Enable debug on stderr"), OPT_BOOL, &opt_stderr },
{ 'n', "nostderr", N_("Disable debug on stderr"), OPT_BOOL, &opt_nostderr },
{ 's', "syslog", N_("Enable debug to syslog"), OPT_BOOL, &opt_syslog },
{ 'S', "nosyslog", N_("Disable syslog (all messages)"), OPT_BOOL, &opt_nosyslog },
{ 'l', "logfile", N_("Enable debug to file"), OPT_STR, &opt_logpath },
Expand Down Expand Up @@ -859,6 +861,8 @@ main(int argc, char **argv)
if (opt_logpath)
log_options |= TVHLOG_OPT_DBG_FILE;
}
if (opt_nostderr)
log_options &= ~(TVHLOG_OPT_DECORATE|TVHLOG_OPT_STDERR|TVHLOG_OPT_DBG_STDERR);
if (opt_nosyslog)
log_options &= ~(TVHLOG_OPT_SYSLOG|TVHLOG_OPT_DBG_SYSLOG);
if (opt_fileline)
Expand Down

0 comments on commit 53f5856

Please sign in to comment.