aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-10-16 12:03:57 +1300
committerAldo Cortesi <aldo@nullcube.com>2016-10-16 20:26:06 +1300
commit55cb2a85472de8698b3dabc7ddc920b930e355d9 (patch)
treed71682210fdae6456edda25d5df2af5e55a5f724 /examples
parenta6c7a1ff918c5aa0285decb995096190888a2f51 (diff)
downloadmitmproxy-55cb2a85472de8698b3dabc7ddc920b930e355d9.tar.gz
mitmproxy-55cb2a85472de8698b3dabc7ddc920b930e355d9.tar.bz2
mitmproxy-55cb2a85472de8698b3dabc7ddc920b930e355d9.zip
docs: logging and the context
Diffstat (limited to 'examples')
-rw-r--r--examples/logging.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/logging.py b/examples/logging.py
new file mode 100644
index 00000000..dccfd8b2
--- /dev/null
+++ b/examples/logging.py
@@ -0,0 +1,6 @@
+from mitmproxy import ctx
+
+
+def start():
+ ctx.log.info("This is some informative text.")
+ ctx.log.error("This is an error.")