MCPcopy
hub / github.com/mitmproxy/mitmproxy / alert

Method alert

mitmproxy/log.py:151–163  ·  view source on GitHub ↗

Log with level alert. Alerts have the same urgency as info, but signals to interactive tools that the user's attention should be drawn to the output even if they're not currently looking at the event log.

(self, txt)

Source from the content-addressed store, hash-verified

149 logging.getLogger().info(txt)
150
151 def alert(self, txt):
152 """
153 Log with level alert. Alerts have the same urgency as info, but
154 signals to interactive tools that the user's attention should be
155 drawn to the output even if they're not currently looking at the
156 event log.
157 """
158 warnings.warn(
159 "mitmproxy's ctx.log.alert() is deprecated. Please use the standard Python logging module instead.",
160 DeprecationWarning,
161 stacklevel=2,
162 )
163 logging.getLogger().log(ALERT, txt)
164
165 def warn(self, txt):
166 """

Callers

nothing calls this directly

Calls 2

warnMethod · 0.80
logMethod · 0.45

Tested by

no test coverage detected