Make logging work (hackish)

This is this commit: https://github.com/cyx/shotgun/commit/30985301f367dbec2eaae8a808ee944ed7faf32c