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