MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / __init__

Method __init__

mitmproxy/log.py:37–47  ·  view source on GitHub ↗
(self, colorize: bool)

Source from the content-addressed store, hash-verified

35
36class MitmFormatter(logging.Formatter):
37 def __init__(self, colorize: bool):
38 super().__init__()
39 self.colorize = colorize
40 time = "[%s]"
41 client = "[%s]"
42 if colorize:
43 time = miniclick.style(time, fg="cyan", dim=True)
44 client = miniclick.style(client, fg="yellow", dim=True)
45
46 self.with_client = f"{time}{client} %s"
47 self.without_client = f"{time} %s"
48
49 default_time_format = "%H:%M:%S"
50 default_msec_format = "%s.%03d"

Callers

nothing calls this directly

Calls 2

styleMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected