示例#1
0
 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()
示例#2
0
    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)
示例#3
0
 def handle(self, record):
     """
     Override the QueueListener.handle method with the Handler.handle 
     method
     """
     Handler.handle(self, record)
示例#4
0
 def handle(self, record):
     """
     Override the QueueListener.handle method with the Handler.handle 
     method
     """
     Handler.handle(self, record)