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

Method __debug

mitmproxy/proxy/layer.py:103–114  ·  view source on GitHub ↗

yield a Log command indicating what message is passing through this layer.

(self, message)

Source from the content-addressed store, hash-verified

101 return f"{type(self).__name__}({state})"
102
103 def __debug(self, message):
104 """yield a Log command indicating what message is passing through this layer."""
105 if len(message) > MAX_LOG_STATEMENT_SIZE:
106 message = message[:MAX_LOG_STATEMENT_SIZE] + "…"
107 if Layer.__last_debug_message == message:
108 message = message.split("\n", 1)[0].strip()
109 if len(message) > 256:
110 message = message[:256] + "…"
111 else:
112 Layer.__last_debug_message = message
113 assert self.debug is not None
114 return commands.Log(textwrap.indent(message, self.debug), DEBUG)
115
116 @property
117 def stack_pos(self) -> str:

Callers 3

handle_eventMethod · 0.95
__processMethod · 0.95
__continueMethod · 0.95

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected