MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / __init__

Method __init__

mitmproxy/addons/termlog.py:38–42  ·  view source on GitHub ↗
(self, out: IO[str] | None = None)

Source from the content-addressed store, hash-verified

36
37class TermLogHandler(log.MitmLogHandler):
38 def __init__(self, out: IO[str] | None = None):
39 super().__init__()
40 self.file: IO[str] = out or sys.stdout
41 self.has_vt_codes = vt_codes.ensure_supported(self.file)
42 self.formatter = log.MitmFormatter(self.has_vt_codes)
43
44 def emit(self, record: logging.LogRecord) -> None:
45 try:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected