aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-05-31 17:25:36 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-05-31 17:25:36 +1200
commitaf666612123073ae835dc8f52905e4268741a3b0 (patch)
tree5a7d3c35ddf7556696e9aa73bcad15046921ffcd /libpathod/pathod.py
parente7c255a3bb2e935345b471752e38e2ec2a5b132c (diff)
downloadmitmproxy-af666612123073ae835dc8f52905e4268741a3b0.tar.gz
mitmproxy-af666612123073ae835dc8f52905e4268741a3b0.tar.bz2
mitmproxy-af666612123073ae835dc8f52905e4268741a3b0.zip
Add timestamps to logs by everywhere
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r--libpathod/pathod.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py
index 7e318ca1..a3f32ce7 100644
--- a/libpathod/pathod.py
+++ b/libpathod/pathod.py
@@ -106,16 +106,15 @@ class PathodHandler(tcp.BaseHandler):
lr = self.rfile if self.server.logreq else None
lw = self.wfile if self.server.logresp else None
with log.Log(self.logfp, self.server.hexdump, lr, lw) as lg:
- while 1:
+ while True:
try:
frm = websockets.Frame.from_file(self.rfile)
break
except tcp.NetLibTimeout:
pass
- print frm.human_readable()
+ lg(frm.human_readable())
return self.handle_websocket, None
-
def handle_http_request(self):
"""
Returns a (handler, log) tuple.