[mythtv-users] trunk gentoo ebuilds and logrotate

Bill Meek keemllib at gmail.com
Thu Sep 22 22:38:11 UTC 2011


On Thu, 2011-09-22 at 08:29 -0700, freedenizen wrote:
> On Wed, Sep 21, 2011 at 7:05 PM, Bill Meek <keemllib at gmail.com> wrote:
...
> > Does this help?
> >
Hi;

As  noted on IRC last night, my link was poor and should have been:

 http://www.mythtv.org/wiki/Logging#Log_file_cleanup

...
> Ah ya, I actually had created a cronjob:
> find /var/log/mythtv -mtime +7 -daystart -execdir rm '{}' \; 2>/dev/null
...

No offense intended. I read the "many hundreds of log files" part and
assumed you hadn't used that solution.

In any event,

The 'find' and '-exec' stuff I added are gone and replaced (by wagnerrp)
with his python script (line 79 needs another trailing ')'.)

  os.unlink(os.path.join(self.path, self.filename)

The script expects only the new MythTV log file name formats as in:

 application.date.pid.log{.#}{.gz}

and it aborts on file names like mythfrontend.log or my local files
(like LocalShutdown.log etc.)

I'm still working with it, but my python skills are fairly slim.

Bill




More information about the mythtv-users mailing list