MCPcopy
hub / github.com/mitmproxy/mitmproxy / install

Method install

mitmproxy/log.py:85–94  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 )
84
85 def install(self) -> None:
86 if self._initiated_in_test:
87 for h in list(logging.getLogger().handlers):
88 if (
89 isinstance(h, MitmLogHandler)
90 and h._initiated_in_test != self._initiated_in_test
91 ):
92 h.uninstall()
93
94 logging.getLogger().addHandler(self)
95
96 def uninstall(self) -> None:
97 logging.getLogger().removeHandler(self)

Callers 4

__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80

Calls 1

uninstallMethod · 0.45

Tested by

no test coverage detected