Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sample Logrotater for a Linux Server running Ruby on Rails
# Logrotater:
# - Daily
# - Timestamped
# - Doesn't error on missing log files
# - Keeps seven copies
# - Truncates log files (allows Rails to start writing to the new log file without
# a restart)
/var/app/current/log/production.log {
daily
dateext
missingok
rotate 7
copytruncate
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment