(self, record)
| 7 | self.log_queue = log_queue |
| 8 | |
| 9 | def emit(self, record): |
| 10 | try: |
| 11 | msg = self.format(record) |
| 12 | self.log_queue.put(f"{msg}\n") |
| 13 | except Exception: |
| 14 | self.handleError(record) |
| 15 | |
| 16 | def setup_logging(log_queue): |
| 17 | """Set up logging to capture terminal output""" |