Logrotate
Logrotate is a utility for managing log files on Unix-like systems. Its primary purpose is to rotate, compress, remove and mail system logs to prevent log files from growing too large and exhausting disk space. It is widely used across Linux distributions and other Unix-like environments and is typically run automatically by cron or a systemd timer.
Configuration is centralized in /etc/logrotate.conf with per-package configurations in /etc/logrotate.d/. The main file defines global defaults
Logrotate keeps track of when each log was rotated using a state file, typically /var/lib/logrotate/status, so
Common usage: distros install a daily cron job or a systemd timer that runs logrotate with /etc/logrotate.conf.
Limitations: Logrotate does not itself rewrite log statements; it relies on the services to reopen log files