Fix bug concerning the log level

The check, which messages should get printed, was not implemented
correctly. This has been fixed.