MCPcopy Index your code
hub / github.com/python/cpython / handle

Method handle

Lib/logging/__init__.py:1014–1031  ·  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

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

Callers

nothing calls this directly

Calls 2

emitMethod · 0.95
filterMethod · 0.45

Tested by

no test coverage detected