(self, record: logging.LogRecord)
| 42 | self.formatter = log.MitmFormatter(self.has_vt_codes) |
| 43 | |
| 44 | def emit(self, record: logging.LogRecord) -> None: |
| 45 | try: |
| 46 | print(self.format(record), file=self.file) |
| 47 | except OSError: |
| 48 | # We cannot print, exit immediately. |
| 49 | # See https://github.com/mitmproxy/mitmproxy/issues/4669 |
| 50 | sys.exit(1) |