Tests around logging and fix for setting logLevel, fixes #83 and #84