fix #234.
Merge pull request #270 from eggrobin/logging-in-separate-class

Move logging interface to a separate class