MCPcopy Create free account
hub / github.com/RustPython/RustPython / handle

Method handle

Lib/logging/__init__.py:1011–1028  ·  view source on GitHub ↗

Conditionally emit the specified logging record. Emission depends on filters which may have been added to the handler. Wrap the actual emission of the record with acquisition/release of the I/O thread lock. Returns an instance of the log record that was emi

(self, record)

Source from the content-addressed store, hash-verified

1009 'by Handler subclasses')
1010
1011 def handle(self, record):
1012 """
1013 Conditionally emit the specified logging record.
1014
1015 Emission depends on filters which may have been added to the handler.
1016 Wrap the actual emission of the record with acquisition/release of
1017 the I/O thread lock.
1018
1019 Returns an instance of the log record that was emitted
1020 if it passed all filters, otherwise a false value is returned.
1021 """
1022 rv = self.filter(record)
1023 if isinstance(rv, LogRecord):
1024 record = rv
1025 if rv:
1026 with self.lock:
1027 self.emit(record)
1028 return rv
1029
1030 def setFormatter(self, fmt):
1031 """

Callers

nothing calls this directly

Calls 3

emitMethod · 0.95
isinstanceFunction · 0.85
filterMethod · 0.45

Tested by

no test coverage detected