[mythtv-users] mythbackend logging

Stephen Worthington stephen_agent at jsw.gen.nz
Sat Jan 13 12:51:54 UTC 2018


On Sat, 13 Jan 2018 09:03:55 +0000, you wrote:

>how do we set file based logging for mythbackend, when NOT running as daemon?
>i run mythbackend in a screen session so mythbackend outputs to that console. Does mythbackend offer it's own way to teeing the output to both console and file, or would i have to run something like  'mythbackend 2>&1 | tee /var/log/mythtv/backend.log'?
>
>on a similar note, is there a way to set mythbackend logging via a config file, so instead of (for example) 'mythbackend --loglevel debug --logpath /path/to/log ...' i'd simply run 'mythbackend' and it'll do whatever is defined in the config file?
>
>Ultimately, I'm hoping to monitor the state of mythfilldatabase, so if it reports an error, i can monitor it and fire an email off. however i guess there could be other things i might wish to monitor for in the future so getting everything in one file seems like a better way to handle things.

Run

mythbackend --help

to see the logging options.  I do not think it has a way of doing tee
for you, but it can direct the log to a file, which you can then run
tail -f on if you want.

What distro are you using?  In Ubuntu 16.04, you can add options to
the mythbackend command line by creating a file:

/etc/mythtv/additional.args

and in that file you put a line like this:

ADDITIONAL_ARGS=-v record,dvbcam

that contains any extra options you want.  This only works if you
start mythbackend using the normal systemd mythtv-backend unit.


More information about the mythtv-users mailing list