rsyslog is an implementation of syslog. This page provides basic information on configuring rsyslog for use with MythTV, but additional information can be found on the rsyslog web site and wiki.
Templated Logging to local7 Facility
This configuration uses an alternate approach to logging based around rsyslog templates. This approach has the benefit that it will use an appropriate log file name, regardless of MythTV application names (and future changes/additions to the MythTV application suite). However, some distributions configure rsyslog in such a way that the templated configuration will not work. (For example, this configuration most likely will not work in Ubuntu, due to https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/484336 and https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/407862 .)
This configuration assumes that all MythTV applications use the local7 syslog facility for logging. This is done by specifying the command-line argument
--syslog local7 to all MythTV applications, for example:
mythbackend --syslog local7
It also assumes that no other non-MythTV applications are using the local7 facility for logging.
To use the configuration, place the configuration file at
/etc/rsyslog.d/40-mythtv-templated.conf, and restart rsyslogd, then start MythTV applications with
|| Example configuration file for using rsyslog for MythTV application logging.
# Begin /etc/rsyslog.d/40-mythtv-templated.conf
# Use MythTV-specific file permissions.
# Comment this section to use syslog defaults.
# Ensure you reset syslog defaults at the bottom if you use this section.
# Specify a log file name format. Ensure one of the following templates is
# - Use a single log file for all logging from any MythTV application:
# - Use a single log file per application:
# - Use a separate log file per process:
# Send all logging on local7 facility to mythtvFile (filename created according
# to the template specified, above), then discard (so the message is not also
# written to system other log files).
# This should catch any output from MythTV applications, assuming they are
# started with:
# --syslog local7
# Reset global directives to those specified in the main rsyslog.conf file
# Ensure the following values are specified (and agree with the main
# rsyslog.conf file) if you set MythTV-specific permissions at top.
# End /etc/rsyslog.d/40-mythtv-templated.conf