Step 1: Here is the file to put in config/logrotate/mysfproject.logrotate.conf
/path/to/your/symfony/project/log/*.log {
rotate 10
daily
compress
copytruncate
missingok
}Step 2: symlink the file in the logrotate system configuration directorysudo ln -s /path/to/your/symfony/project/config/logrotate/mysfproject.logrotate.conf /etc/logrotate.d/
You are done!. the logs of your project will be rotated automatically every days, previous 10 days will be kept, previous days will be compressed.
