Pull the logger out into its own package.

Related to #282.