Project

General

Profile

Bug #2787

There is no way to disable output to syslog

Added by Ivan Kalvachev over 9 years ago. Updated over 9 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

History

#1

Updated by alf alfonsius over 9 years ago

i did asked about this a some time ago, no progress, answer was "filter the log..." so i did that. not that i like it tho.
every decent program should have the possibility to create its own log, especially if you run a lot of processes like me, sometimes 100+ on each machine.
well, the fast and easy way -> https://tvheadend.org/boards/5/topics/14755?r=15732#message-15732

#2

Updated by Jaroslav Kysela over 9 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|e0630fa4582854aff0ea09fa236e9ff10eed9222.

Also available in: Atom PDF