code: def filter(self, record):
          
          if isinstance(record.msg, basestring):
              message = record.msg.lower()
              if all(kw in message for kw in self.KEYWORDS):
                  record.levelname = 'DEBUG'
                  record.levelno = logging.DEBUG
          return 1
docs: Change the severity of selected log records.