Project

General

Profile

Actions

Bug #2787

closed

There is no way to disable output to syslog

Added by Ivan Kalvachev about 10 years ago. Updated almost 10 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
General
Target version:
-
Start date:
2015-04-17
Due date:
% Done:

100%

Estimated time:
Found in version:
3.9.2679~g995aaf8
Affected Versions:

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

Actions

Also available in: Atom PDF