aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/simple/custom_option.py10
-rw-r--r--examples/simple/log_events.py4
2 files changed, 11 insertions, 3 deletions
diff --git a/examples/simple/custom_option.py b/examples/simple/custom_option.py
index 5b6070dd..8d0cfe7f 100644
--- a/examples/simple/custom_option.py
+++ b/examples/simple/custom_option.py
@@ -1,3 +1,13 @@
+"""
+This example shows how addons can register custom options
+that can be configured at startup or during execution
+from the options dialog within mitmproxy.
+
+Example:
+
+$ mitmproxy --set custom=true
+$ mitmproxy --set custom # shorthand for boolean options
+"""
from mitmproxy import ctx
diff --git a/examples/simple/log_events.py b/examples/simple/log_events.py
index 581b99f3..b9aa2c1f 100644
--- a/examples/simple/log_events.py
+++ b/examples/simple/log_events.py
@@ -1,8 +1,6 @@
"""
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 :-)
+print() statements are equivalent to ctx.log.warn().
"""
from mitmproxy import ctx