Cleans up logging.