Logrotate setup+discussion

I don't know anything about logrotate. A quick glance made it look like it's run as a cron job, though, so my guess is you don't have to do anything.

--Ethan McCutchen.....2014-12-02 22:24:48 +0000

Well, I guess the question is this: is wagn going to throw a fit if production.log suddenly changes while it's running?

--Lora Friedenthal.....2014-12-02 23:11:29 +0000

FWIW

 

/srv/www.teenwolfwiki.com/log/*.log {

weekly

missingok

rotate 52

compress

delaycompress

notifempty

sharedscripts

postrotate

/etc/init.d/apache2 reload > /dev/null

endscript

prerotate

if [ -d /etc/logrotate.d/httpd-prerotate ]; then \

run-parts /etc/logrotate.d/httpd-prerotate; \

fi; \

endscript

}

 

seems to work quite nicely. My 4G log file is now a 340MB log file and it's already done a second rotation. I don't actually know if the reloading apache part is necessary, but it doesn't seem to be hurting anything.

--Lora Friedenthal.....2014-12-14 14:00:32 +0000