Log Rotation Runbook
Context
This runbook explains the project log-retention policy and how to run log rotation safely.
Details
Policy summary:
- active logs keep recent history;
- old entries are compressed into logs/archives/*.gz;
- outdated archives are purged by retention policy.
Execution paths: - local dry-run to preview changes; - local real execution for maintenance; - scheduled CI workflow for recurring automation.
Suggested operator commands:
- python scripts/rotate_logs.py --dry-run
- python scripts/rotate_logs.py --report
Validation checklist: - confirm archive files are created with date suffix; - confirm active logs are reduced as expected; - confirm old archives are purged when over retention window.