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.

Configuration
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 your 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.

contains all log rotate settings and directives.

Example configuration files
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.