MCPcopy
hub / github.com/mitmproxy/mitmproxy / emit

Method emit

mitmproxy/addons/termlog.py:44–50  ·  view source on GitHub ↗
(self, record: logging.LogRecord)

Source from the content-addressed store, hash-verified

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)

Callers 2

wRFunction · 0.45
TRFunction · 0.45

Calls 2

formatMethod · 0.80
exitMethod · 0.80

Tested by

no test coverage detected