Add logging support

Fixes #9
Fixes #10
Merge branch 'logging'

* logging:
  Add logging support