Logging.

Fixes #45.