[mythtv-users] --logfile vs. --logpath

Michael T. Dean mtdean at thirdcontact.com
Mon May 21 22:51:19 UTC 2012


On 05/21/2012 02:56 PM, Stephan Seitz wrote:
> On Mon, May 21, 2012 at 02:22:36PM -0400, Michael T. Dean wrote:
>> MythTV is different from many/most other *nix apps in that there are 
>> often multiple instances of applications running--and logging 
>> information--concurrently. That said, the only "good old unix way" of 
>
> You mean like a mail server like postfix with its different 
> applications like smtpd, qmgr, cleanup or postscreen being able to 
> receive and handle mails in parallel and logging each process without 
> exploding computers?
>
>> logging I know of is, in fact, syslog--everything else is pretty much 
>> non-standard, application-specific logging practices (where the vast 
>> majority of those applications have only one instance or an 
>> application to worry about, too).
>
> Well, show me an application with the same behaviour as mythtv. The 
> applications (like apache) which don’t use syslog can be told to log 
> into a certain file. Some can rotate the logfiles themself, others 
> need logrotate, but you always know which file will contain the 
> current logoutput.
>
>> FWIW, you don't need an unused log facility with the simple 
>> configuration (which I just moved to a separate page so it's easier 
>> to quote/easier to distinguish as separate).
>> http://www.mythtv.org/wiki/Simple_rsyslog_Configuration
>> As for dealing with multiple syslog implementations, I'd suppose 
>> packagers could handle it as they do for other syslog-using 
>> applications. (That said, I know nothing of packaging, but I do know 
>> of many applications that use syslog.)
>
> It isn’t that easy. Your rsyslog examples will only work with rsyslog, 
> and only rsyslog has the rsyslog.d directory. If the system uses 
> syslog-ng or sysklogd you must manipulate one global configuration file.

Having used syslog-ng in the past, I know it supports includes:

http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-3.3-guides/syslog-ng-ose-v3.3-guide-admin-en.html/including-config-files.html

> syslog-ng and sysklogd will support filtering according to facility, 
> but I don’t know if you can filter for application names.

and filtering by application (program() filter function--even allowing 
regexp usage for matching):

http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-3.3-guides/syslog-ng-ose-v3.3-guide-admin-en.html/reference_filters.html

and, as a matter of fact, it's actually a recommended feature of the 
official protocol ( http://tools.ietf.org/html/rfc5424#section-6.2.5 ), 
so I'd assume even syslogd supports it.

> I would certainly not try to put such a logic into a package.
>
> On the other hand, mythtv generates to much logs to put everything 
> into /var/log/syslog.

Agreed--just jamming everything into any one log file (whether a syslog 
log file or one specifically for mythtv) makes a huge, unreadable, 
unusable mess.

However, I'm pretty sure all it would take to get a good syslog-ng 
configuration on the wiki is a motivated individual who actually has 
syslog-ng and MythTV installed and a bit of reading and trial and error. 
(FWIW, that's how I came up with the rsyslog ones.) Chances are, someone 
could also do a syslogd configuration--if anyone still uses it. :)

Mike


More information about the mythtv-users mailing list