Flush, if appropriately configured, set the target to None and lose the buffer.
(self)
| 1424 | self.buffer.clear() |
| 1425 | |
| 1426 | def close(self): |
| 1427 | """ |
| 1428 | Flush, if appropriately configured, set the target to None and lose the |
| 1429 | buffer. |
| 1430 | """ |
| 1431 | try: |
| 1432 | if self.flushOnClose: |
| 1433 | self.flush() |
| 1434 | finally: |
| 1435 | with self.lock: |
| 1436 | self.target = None |
| 1437 | BufferingHandler.close(self) |
| 1438 | |
| 1439 | |
| 1440 | class QueueHandler(logging.Handler): |