Not logged in (Log in or Sign up)

unwwwritten

note to self... rotate your logs

Stumbled upon this simple recipe for rotating rails logs when working with passenger. Saving it here for reference.

this is it...

/home/deploy/app/shared/log/*.log {
  daily
  missingok
  rotate 30
  compress
  delaycompress
  sharedscripts
  postrotate
    touch /home/deploy/app/current/tmp/restart.txt
  endscript
}

Thanks to this post for the facts. They've got a great explanation of all the options too.

blog comments powered by Disqus