Handle logfile rotation.