add support for logger

Fixes #12