aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/data
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-10-04 13:00:15 +1100
committerAldo Cortesi <aldo@nullcube.com>2016-10-04 13:00:15 +1100
commit7fe09f4d26e604db9d3e7f9868b3f0da0b3a6406 (patch)
tree9749b5b1477eb8638d2e649328583af59d094b8e /test/mitmproxy/data
parent2bd868662937b504cccd825e9e24e3cb6a142708 (diff)
downloadmitmproxy-7fe09f4d26e604db9d3e7f9868b3f0da0b3a6406.tar.gz
mitmproxy-7fe09f4d26e604db9d3e7f9868b3f0da0b3a6406.tar.bz2
mitmproxy-7fe09f4d26e604db9d3e7f9868b3f0da0b3a6406.zip
Consolidate logging
- Make log event handler work - Move terminal event log into an addon - Clean various log related errors and duplications
Diffstat (limited to 'test/mitmproxy/data')
-rw-r--r--test/mitmproxy/data/addonscripts/recorder.py4
-rw-r--r--test/mitmproxy/data/scripts/all.py16
2 files changed, 10 insertions, 10 deletions
diff --git a/test/mitmproxy/data/addonscripts/recorder.py b/test/mitmproxy/data/addonscripts/recorder.py
index 890e6f4e..3d7a51bf 100644
--- a/test/mitmproxy/data/addonscripts/recorder.py
+++ b/test/mitmproxy/data/addonscripts/recorder.py
@@ -15,8 +15,8 @@ class CallLogger:
lg = (self.name, attr, args, kwargs)
if attr != "log":
ctx.log.info(str(lg))
- self.call_log.append(lg)
- ctx.log.debug("%s %s" % (self.name, attr))
+ self.call_log.append(lg)
+ ctx.log.debug("%s %s" % (self.name, attr))
return prox
raise AttributeError
diff --git a/test/mitmproxy/data/scripts/all.py b/test/mitmproxy/data/scripts/all.py
index bf8e93ec..95edfe97 100644
--- a/test/mitmproxy/data/scripts/all.py
+++ b/test/mitmproxy/data/scripts/all.py
@@ -1,37 +1,37 @@
import mitmproxy
-log = []
+record = []
def clientconnect(cc):
mitmproxy.ctx.log("XCLIENTCONNECT")
- log.append("clientconnect")
+ record.append("clientconnect")
def serverconnect(cc):
mitmproxy.ctx.log("XSERVERCONNECT")
- log.append("serverconnect")
+ record.append("serverconnect")
def request(f):
mitmproxy.ctx.log("XREQUEST")
- log.append("request")
+ record.append("request")
def response(f):
mitmproxy.ctx.log("XRESPONSE")
- log.append("response")
+ record.append("response")
def responseheaders(f):
mitmproxy.ctx.log("XRESPONSEHEADERS")
- log.append("responseheaders")
+ record.append("responseheaders")
def clientdisconnect(cc):
mitmproxy.ctx.log("XCLIENTDISCONNECT")
- log.append("clientdisconnect")
+ record.append("clientdisconnect")
def error(cc):
mitmproxy.ctx.log("XERROR")
- log.append("error")
+ record.append("error")