Sets up automatic rotation and archival of log files.