[clo-devel] Huge trac.log's

Ingvar ingvar at hexapodia.net
Fri Dec 16 07:01:57 UTC 2011

Ray writes:
> Just noticed that there are huge trac.logs.  The cmucl trac log is 225
> MB.  The oct and f2cl logs are huge too.
> Is there any script available to rotate the logs?

It should be relatively ueasy to convince logrotate to include those in the 
normal log rotation.

I don't know the path to the trac logs, but that aside, dropping a file with 
contents something like this into /etc/logrotate.d/ should do the trick:

----->8 Example trac.log rotate specification 8<------
/path/to/trac.log {
   rotate 5
   create <mode> <owner> <group>
--------->8 END 8<---------

There's a whole slew of tunables in there. Don't know if daily or monthly 
would be the right rotation cycle. Don't know how much historical log to save. 
I do think both "compress" (compress historical logs) and "delaycompress" 
(don't compress the first few rotated logs) make sense, but...

If the ownership is identical, the path specification should take glob 
wildcards, so /path/to/projects/*/trac.log MAY work. But I suspect they're 
differing in at least group, so one per trac log is probably right.


More information about the clo-devel mailing list