Logrotate

Logrotate is a tool to periodically rotate (archive), delete, and optionally compress and/or mail historic log files. Logrotate ships with, and is invoked by a cron job.

Files
Accelerating log rotation can be very useful to setting up log rotate. Initial purging of extremely large logs, getting familiar with day to day messages, cleaning up the system, and setting up intrusion prevention systems can benefit greatly from this. Daily log rotation encourages administrators to be proactive about security, and system health rather than reactive.


 * - The daemon's configuration file.
 * - This directory contains all log rotate settings and directives.

Portage log example
If the PORT_LOGDIR variable is set in build logs will need to be rotated. The first line of the configuration file should hold the path where logs are stored by Portage:

To regularly delete logs add the line  to the config file, where   is the number of days after which the log file will be deleted.