Rotating Trac Logs

  • 19th Dec 2007
  • 1 min read
  • • 
  • Tags: 
  • Linux
  • Trac

So, you're like me and like to have trac constantly logging to file and you hate those files getting huge?

It is assumed that you keep all your trac environments on the same base directory, for example /var/lib/trac/

Here's a simple logrotate config file(normaly under /etc/logrotate.d/):

/var/lib/trac/*/log/trac.log {
    weekly
    rotate 7
    missingok
    create 640 www-data www-data
    compress
}

I hope you enjoy this simple solution.