Bug #2787
closedThere is no way to disable output to syslog
100%
Description
TvHeadEnd outputs too many messages during normal operation and I do not want them in my syslog. I've tried to output the messages to --logfile , but it doesn't stop the syslog output.
This is because TVHLOG_OPT_SYSLOG is unconditionally enabled in main.c::main()::442 and there is no way to clear it. (other than hacking the source directly).
The function tvhlog.c::tvhlog_process() would then print all messages that are with severity that is not LOG_DEBUG to the system log.
The option -s/--syslog says that it enables output to syslog, but since it is always enabled, it only enables output of debug messages to the syslog.
However, the option -d/--debug that is supposed to allow the output of all debug messages, only enables the output of debug messages to stderr.
I can think of 3 major ways to fix this:
1. Keep syslog enabled by default, but disable it if --logfile is given. You can enable both by providing both --logfile and --syslog options.
2. Enable syslog only when --syslog option is used. Let the --debug option output debug messages to all available outputs (syslog/stderr/file) simultaneously.
3. Allow --syslog/--debug to take parameters, e.g. 0 - disable; 1 - output; 2 - output+debug