mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 10:26:23 +00:00
0c6663d0d5
- Add an options parameter to the start() event. This is to be used by addons on startup to add custom options. - Add a running() event that is called once the proxy is up and running. - With the new paradigm we can't log during master __init__, so add a tiny termstatus addon to print proxy status to terminal once we're running.
13 lines
358 B
Python
13 lines
358 B
Python
"""
|
|
It is recommended to use `ctx.log` for logging within a script.
|
|
This goes to the event log in mitmproxy and to stdout in mitmdump.
|
|
|
|
If you want to help us out: https://github.com/mitmproxy/mitmproxy/issues/1530 :-)
|
|
"""
|
|
from mitmproxy import ctx
|
|
|
|
|
|
def start(opts):
|
|
ctx.log.info("This is some informative text.")
|
|
ctx.log.error("This is an error.")
|