MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / emit

Method emit

tools/python-3.11.9-amd64/Lib/logging/__init__.py:1216–1230  ·  view source on GitHub ↗

Emit a record. If the stream was not opened because 'delay' was specified in the constructor, open it before calling the superclass's emit. If stream is not open, current mode is 'w' and `_closed=True`, record will not be emitted (see Issue #42378).

(self, record)

Source from the content-addressed store, hash-verified

1214 encoding=self.encoding, errors=self.errors)
1215
1216 def emit(self, record):
1217 """
1218 Emit a record.
1219
1220 If the stream was not opened because 'delay' was specified in the
1221 constructor, open it before calling the superclass's emit.
1222
1223 If stream is not open, current mode is 'w' and `_closed=True`, record
1224 will not be emitted (see Issue #42378).
1225 """
1226 if self.stream is None:
1227 if self.mode != 'w' or not self._closed:
1228 self.stream = self._open()
1229 if self.stream:
1230 StreamHandler.emit(self, record)
1231
1232 def __repr__(self):
1233 level = getLevelName(self.level)

Callers

nothing calls this directly

Calls 2

_openMethod · 0.95
emitMethod · 0.45

Tested by

no test coverage detected