Conditionally emit the specified logging record. Emission depends on filters which may have been added to the handler. Wrap the actual emission of the record with acquisition/release of the I/O thread lock. Returns an instance of the log record that was emi
(self, record)
| 1012 | 'by Handler subclasses') |
| 1013 | |
| 1014 | def handle(self, record): |
| 1015 | """ |
| 1016 | Conditionally emit the specified logging record. |
| 1017 | |
| 1018 | Emission depends on filters which may have been added to the handler. |
| 1019 | Wrap the actual emission of the record with acquisition/release of |
| 1020 | the I/O thread lock. |
| 1021 | |
| 1022 | Returns an instance of the log record that was emitted |
| 1023 | if it passed all filters, otherwise a false value is returned. |
| 1024 | """ |
| 1025 | rv = self.filter(record) |
| 1026 | if isinstance(rv, LogRecord): |
| 1027 | record = rv |
| 1028 | if rv: |
| 1029 | with self.lock: |
| 1030 | self.emit(record) |
| 1031 | return rv |
| 1032 | |
| 1033 | def setFormatter(self, fmt): |
| 1034 | """ |