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)
| 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 | """ |
no test coverage detected