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

Method flush

Lib/logging/handlers.py:1432–1444  ·  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

1430 self.target = target
1431
1432 def flush(self):
1433 """
1434 For a MemoryHandler, flushing means just sending the buffered
1435 records to the target, if there is one. Override if you want
1436 different behaviour.
1437
1438 The record buffer is only cleared if a target has been set.
1439 """
1440 with self.lock:
1441 if self.target:
1442 for record in self.buffer:
1443 self.target.handle(record)
1444 self.buffer.clear()
1445
1446 def close(self):
1447 """

Callers 2

closeMethod · 0.95
reopenIfNeededMethod · 0.45

Calls 2

handleMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected