Issue #25: Implement log rotation.