-
-
Save rubyonrailsworks/4555963 to your computer and use it in GitHub Desktop.
This file contains 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
/path/to/unicorn/log/unicorn.stderr.log | |
/path/to/production/log/production.log | |
{ | |
daily | |
missingok | |
rotate 180 | |
compress | |
dateext | |
# this is important if using "compress" since we need to call | |
# the "lastaction" script below before compressing: | |
delaycompress | |
# note the lack of the evil "copytruncate" option in this | |
# config. Unicorn supports the USR1 signal and we send it | |
# as our "lastaction" action: | |
lastaction | |
pid=/path/to/pid/unicorn.pid | |
test -s $pid && kill -USR1 "$(cat $pid)" | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment