refactor logging to disable / enable log levels
merging master