Fix and harden setupLogging()
print -> msg()
Merge pull request #76 from whirm/logging_fixes

Logging fixes