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)
| 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 | """ |