LoggerExecutionWrapper logs errors when being asked if certain loglevel is enabled.

Added test and fix.