ongeboren

Joined: 10 Jun 2004 Posts: 21 Location: Earth
|
Posted: Tue Aug 29, 2006 4:44 am Post subject: logrotate |
|
|
I searched the forum and didn't find a topic about how to use logrotate with xchat to rotate the log files. As there was a discussion about it in the channel on freenode, this is the resumee.
Here is what I'm using. You may put the following code into
/etc/logrotate.d/xchat (i'm a debian user). It will perform a weekly rotation, provided the log size is more than 100K big, old rotated files will get compressed and finally xchat is pushed (several times) to reload it's log files.
Please, note also the answer of Khisanth to the following thread: http://forum.xchat.org/viewtopic.php?t=2170&highlight=logrotate , as it gives another way (probably more convenient) to split your log files.
Here is the logrotate config block:
[code8943f7]
/home/*/.xchat2/xchatlogs/*.log {
weekly
missingok
size=100k
rotate 52
compress
delaycompress
nocreate
postrotate
pkill -SIGUSR1 xchat
endscript
}
[/code8943f7]
p.s. i don't know why the forum isn't letting me use the code blocks and how those numbers come there.. |
|