Clean up logging code.