How To: Include Additional Files In logrotate Configuration
Step 1
Identify the file you need to include. This might be /var/log/additional.log
.
Step 2
Create a file named “additional” in the configuration directory of logrotate (/etc/logrotate.d
) with the following content:
/var/log/additional.log {
rotate 12
monthly
compress
missingok
notifempty
}
This will rotate the file monthly, compress the rotated archives and keep them for 12 months.
Further details how to configure a different way of rotation see man page of logrotate.