Implement simple log rotation support