Cleaning up logging handling.