add logger support, fixes #1