Correctly set the level of logging