I have some modules each implementing a class where each class creates its own logger with
logger = logging.getLogger(__name__)
and the module uses this with self.logger.info(), self.logger.debug() and so on.
Now I want to suppress the log messages from one specific class. But the class invokes the logger functions. The Python logging system allows to set the log level with
logging.basicConfig(filename='example.log',level=logging.DEBUG)
But that does not allow to specify the logger name. Would it be possible to create a dummy logger and use in the class to suppress? Are there other means to control the log output by the logger name?