def showwarning(message, category, filename, lineno, file=None, line=None): message = self.message_to_unicode(message) record = self.make_record(message, category, filename, lineno) logbook.dispatch_record(record)
def handle_message(self, timeout: Optional[float]) -> QueueMessage: msg = self.recv(timeout) if isinstance(msg, QueueLogMessage): logbook.dispatch_record(msg.record) return msg elif msg.message_type in QueueMessageType.terminating: return msg else: raise InternalException('Got invalid queue message type {}'.format( msg.message_type))
def emit(self, record): logbook.dispatch_record(self.convert_record(record))