Move log closure code into its own file.