adds logging.
Merge pull request #56 from birkin/master

adds logging.