code: def emit(self, record):
          
          if self.triggerLevelNo is not None and record.levelno>=self.triggerLevelNo:
              self.triggered = True
          logging.handlers.BufferingHandler.emit(self,record)
docs: Emit record after checking if message triggers later sending of e-mail.