It's hardly best practise, but we have a small script that gets run @nightly.
NEW_LOGFILE=log/production.log.`date +%Y%m%d`
cd RAILS_ROOT
cp log/production.log $NEW_LOGFILE
cat /dev/null > log/production.log
/usr/bin/pl_analyze log/production.log.`date +%Y%m%d` -e mich...@koziarski.com
gzip $NEW_LOGFILE
An easier option (if you can) is using the robot-coops sysloglogger,
which means you can use all the standard syslog configuration options
for log rotation
On 2/14/07, Tomek Piatek <tomek.pia...@gmail.com> wrote:
> Anyone have any experience rotating Rails production logs in the case where
> there are multiple instances of the same app running under mongrel cluster
> (UNIX)? How do you do it? Do you use a tool like "logrotate" or do you use
> Rail's built in facility? Is there a best practice for this?
> -t
--
Cheers
Koz