Rotate Log Files

Use Syslog on Linux.

Use the event log on Windows

If you need to be cute checkout this legacy page and note the lack of support and the propensity to crash due to bugs in the logging library