MCPcopy Index your code
hub / github.com/RustPython/RustPython / flush

Method flush

Lib/logging/handlers.py:1412–1424  ·  view source on GitHub ↗

For a MemoryHandler, flushing means just sending the buffered records to the target, if there is one. Override if you want different behaviour. The record buffer is only cleared if a target has been set.

(self)

Source from the content-addressed store, hash-verified

1410 self.target = target
1411
1412 def flush(self):
1413 """
1414 For a MemoryHandler, flushing means just sending the buffered
1415 records to the target, if there is one. Override if you want
1416 different behaviour.
1417
1418 The record buffer is only cleared if a target has been set.
1419 """
1420 with self.lock:
1421 if self.target:
1422 for record in self.buffer:
1423 self.target.handle(record)
1424 self.buffer.clear()
1425
1426 def close(self):
1427 """

Callers 2

closeMethod · 0.95
reopenIfNeededMethod · 0.45

Calls 2

handleMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected