Logrotate for Rails apps
Use logrotate to keep Rails logs from overgrowing.
This is just one example of rotation and it’s not specific to Rails.
View as text
/app/*/shared/log/*log {
compress
copytruncate
create 640 root web
daily
dateext
delaycompress
missingok
notifempty
olddir archive
rotate 30
sharedscripts
size 1M
}