LinHES Forums
http://forum.linhes.org/

logrotate.d and mythbackend.log
http://forum.linhes.org/viewtopic.php?f=6&t=1122
Page 1 of 1

Author:  jeff [ Sat Apr 03, 2004 8:50 am ]
Post subject:  logrotate.d and mythbackend.log

This is using R4V2.

I've found that the backend stops logging messages after a day and I'm wondering if its related to rotating and perhaps compressing the log files. I looked at the code in main.cpp for mythtv and it opens the log file and then dups the file handle for stdout and stderr. It doesn't look like it opens and closes the log file every time it wants to write out a message. I think that this style of writing to a log file is incompatable with rotating the files.

Author:  Xsecrets [ Sat Apr 03, 2004 9:06 am ]
Post subject: 

you hypothosys sounds solid. You should really post this over on the mythtv mailing list. Even if someone here wanted to fix this behavior we would still have to submit the patches back to the mythtv project.

Author:  jeff [ Sat Apr 03, 2004 9:10 am ]
Post subject:  rotating mythbackend.log file

I can post this to the mythtv list as well. I posted it here because its the KnoppMyth distro which sets up the myth-backend file in /etc/logrotate.d and perhaps it shouldn't.

[On an unrelated note, perhaps it should set up a file to rotate the mythfilldatabase.log files]

Author:  jeff [ Sat Apr 03, 2004 8:37 pm ]
Post subject:  [Solution] logrotate.d and mythbackend.log

Someone on the mythtv-dev list kindly pointed out that the "copytruncate" option in the /etc/logrotate.d/mythtv-backend file is the correct way to deal with this situation.

Its pretty self-describing but here's a link which talks about what it does http://kavlon.org/index.php/logrotate

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/