[bash]
$ sudo vi /etc/logrotate.d/rails_production
/var/log/co-meeting/production.log
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
}
[/bash]
動作確認
[bash]
logrotate -dv /etc/logrotate.d/rails_production
reading config file /etc/logrotate.d/rails_production
reading config info for /var/log/co-meeting/production.log
Handling 1 logs
rotating pattern: /var/log/co-meeting/production.log
after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/co-meeting/production.log
log does not need rotating
[/bash]