aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_log.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-06-28 12:16:02 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-06-28 12:16:02 +1200
commit4407508e0ce971b03358877844d409e16b244562 (patch)
treec121b8b15e548792a897fa6217164fcf873bc7a7 /test/test_log.py
parent6b6317e1de7d4168debe9fc3aa5427aab40f13fd (diff)
downloadmitmproxy-4407508e0ce971b03358877844d409e16b244562.tar.gz
mitmproxy-4407508e0ce971b03358877844d409e16b244562.tar.bz2
mitmproxy-4407508e0ce971b03358877844d409e16b244562.zip
Give some structure to the logging module
Diffstat (limited to 'test/test_log.py')
-rw-r--r--test/test_log.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_log.py b/test/test_log.py
index 0d5c6c61..2cac1e7c 100644
--- a/test/test_log.py
+++ b/test/test_log.py
@@ -15,8 +15,9 @@ class DummyIO(StringIO.StringIO):
def test_disconnect():
outf = DummyIO()
rw = DummyIO()
+ l = log.ConnectionLogger(outf, False, rw, rw)
try:
- with log.Log(outf, False, rw, rw) as lg:
+ with l.ctx() as lg:
lg("Test")
except netlib.tcp.NetLibDisconnect:
pass