Expose the log opening logic, calling it from #with_logging.

This allows the log to be cleanly reopened later, e.g. if a babushka dep moves
it to a different filesystem.