[mythtv-users] trunk gentoo ebuilds and logrotate
Bill Meek
keemllib at gmail.com
Thu Sep 22 02:05:30 UTC 2011
On Wed, 2011-09-21 at 18:10 -0700, freedenizen wrote:
...
> Since the change to how logging is handled the /var/log/mythtv on my
> BE now contains many hundreds of log files for mythbackend,
> mythcommflag, mythpreviewgen, etc. It looks like there aren't any
> updated logrotate files floating around anywhere that I have found.
> Has anyone modified some to handle this?
...
Hi;
Does this help?
http://www.mythtv.org/wiki?title=Logging&curid=7289&diff=53235&oldid=53212#Log_file_cleanup
The -delete expression will certainly clean up your logging directory,
and remember that the find command can take the
-exec YourCustomArchive.sh {} \;
expression and you can do whatever you want with the
programname.data.pid.log files.
Then you could use existing logrotate configuration files to
clean up the archive files.
Bill
* Your script could be as simple as:
# Convert the program.date.pid.log into program.log
ARCHIVE=$(echo $1 | sed -n 's/\.20............\.[0-9]*//p')
cat $1 >> $ARCHIVE
rm $1
More information about the mythtv-users
mailing list