Add logger

Trying to achieve this http://stackoverflow.com/a/8693254/880381