def replay_into(self, target: logging.Handler) -> None: self.acquire() try: for record in self.buffer: if record.levelno >= target.level: target.handle(record) finally: self.release()
def replay(self, handler: logging.Handler) -> None: """Replay all :py:class:`logging.LogRecord`s stored in this :py:class:`RecorderHandler` for the given :py:class:`logging.Handler`. Arguments --------- handler: logging.Handler The log handler to which the messages should be replayed. """ for record in self._records: handler.handle(record)
def handle(self, record): """ Override the QueueListener.handle method with the Handler.handle method """ Handler.handle(self, record)