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

Michael T. Dean mtdean at thirdcontact.com
Mon May 21 16:43:23 UTC 2012

On 05/21/2012 12:14 PM, Stephan Seitz wrote:
> On Thu, May 17, 2012 at 03:08:54PM -0400, Raymond Wagner wrote:
>> On 5/17/2012 14:06, Stephan Seitz wrote:
>>> I’m really wondering who thought the change from logfile to logpath was
>>> a good idea. While you now have logfiles according to the name of
>>> process (e.g. mythbackend or mythpreviewgen), the names contain
>>> „cryptic” things like PID and date. How can you now configure any
>>> logrotation program to rotate the right logfiles?
>> Wildcards and manual postrotate definitions.
>> http://www.mythtv.org/wiki/Logrotate_-_mythfrontend
>> http://www.mythtv.org/wiki/Logrotate_-_mythbackend
> Well, I still think this is very ugly. If restart the backend I get a 
> new logfile which has to go through its own rotation cycle together 
> with the old log. This makes the directory contents confusing.
>> The separation of the logs is an attempt to clarify things. Separate 
>> logs for separate instances means when we ask for logs of an event, 
>> it's not going to get interspersed with logs of half a dozen other 
>> preview generation or commercial detection jobs.
> I agree with you that separate logs for separate applications have a 
> great advantage. Yes, and if I debug an application it may have an 
> advantage to have single logs fot the instances, but normally I don’t 
> debug the application and I don’t be interested in playing a „what’s 
> the name of the current logfile” game if I have the need to look into 
> one.
> What would you think if the simple commands „less 
> /var/log/apache2/error.log” or „tail -f /var/log/mail.log” don’t show 
> you the current log content, because the name contains the PID and a 
> date and you have to look into the directory to find the current log?

You do realize you can easily find the current log file with something like:

ls -t /var/log/mythtv/mythbackend-*.log | head -n1

and could even have your mythbackend/mythfrontend start script create a 
link with a name like /var/log/mythtv/mythbackend.log using information 
obtained that way.

> Piping the log output through syslog to get proper logfile names is 
> only a workaround for a buggy software.

Using the definition of buggy = something I don't understand/like?

> So please, can’t you revert the change so that you get 
> <application>.log when you don’t use debugging?

Why not just use syslog? The syslog logging is the approach we've 
provided to allow users to configure the log file name. If you want to 
configure the log file name, you should use the approach we've provided 
to allow you to configure the log file name. (And, again, it's not a 
workaround for a bug--we actually have code that Gavin Hurlbut went to 
great trouble writing specifically to support syslog logging.)

And, we even provide useful syslog configurations you can use ( 
http://www.mythtv.org/wiki/Category:Syslog_Configuration_Files ). Well, 
we've provided them for rsyslog ( 
http://www.mythtv.org/wiki/Rsyslog_Configuration ), because that's the 
syslog implementation I use, and, therefore, the one I was able to 
configure and test (even though I don't use syslog logging, myself). I 
assume that no one else uses any other syslog implementation since no 
one has created other configuration files...


More information about the mythtv-users mailing list