Created
August 22, 2013 15:25
-
-
Save freiden/6308681 to your computer and use it in GitHub Desktop.
Example logrotate sidekiq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rotate log files daily, keep 32 days | |
daily | |
rotate 32 | |
# create new (empty) log files after rotating old ones | |
create | |
compress | |
missingok | |
create 0644 | |
/home/discourse/discourse/log/clockwork.log | |
{ | |
postrotate | |
pkill -HUP -f clockwork | |
endscript | |
} | |
/home/discourse/discourse/log/sidekiq.log | |
{ | |
# Should we just kill sidekiq? | |
# https://github.com/mperham/sidekiq/issues/1008 | |
postrotate | |
pkill -USR2 -f sidekiq | |
endscript | |
} | |
/home/discourse/discourse/log/production.log | |
{ | |
# ???? | |
} | |
/home/discourse/discourse/log/production_errors.log | |
{ | |
# production_errors is opened on demand, no need to reopen | |
} | |
/home/discourse/discourse/log/thin*.log | |
{ | |
postrotate | |
pkill -USR1 -f 'thin server' | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment