Tuesday, February 3, 2009

Logrotate

Because I am too lazy to run
rake log:clear
I created /etc/logrotate.d/repos with these contents:
/home/*/repos/*/log/*.log {
daily
missingok
rotate 3
compress
notifempty
}
All of my projects (rails and otherwise) are in the repos directory of my home directory.

Quick summary of the options: rotate every day, do not worry if there are no logs, keep a compressed, daily log about for 3 days (just in case), do not bother rotating if the log is empty.

Makes for quick acks (--thppt) without having to something else first.

No comments:

Post a Comment