Add two levels of logging.

Closes #239.