User:Rarkenin/Log rotation

Log rotation is an automated process used in system administration, typically on servers, to swap out large log files for fresh ones at set intervals of time or log size, usually performed on Linux. Typically, a server running services such as a LAMP stack will generate logs with every request, which will become extremely large and difficult to handle for administrators. This is typically done on Linux using the logrotate utility. Each time logrotate is invoked, typically via a cronjob, logs will be swapped in or out, even if the service using these logs is still running, and a new log put in place for the server. Log rotation utilities may optionally delete all but the newest logs, mail the logs by e-mail, compress them using Gzip or other formats, or even copy snapshots of the log without affecting the actual log in use.