aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/pathoc.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-10 10:47:28 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-10 10:47:28 +1200
commit2cf79b79126c0845067abce9ab24500810772404 (patch)
treee0a9c184a815285c4395f3b26e6062f821a2b338 /pathod/pathoc.py
parentc421c41307ce1ced06dae9f1d37fb516e6437f1e (diff)
downloadmitmproxy-2cf79b79126c0845067abce9ab24500810772404.tar.gz
mitmproxy-2cf79b79126c0845067abce9ab24500810772404.tar.bz2
mitmproxy-2cf79b79126c0845067abce9ab24500810772404.zip
Remove timestamps from pathoc output
Pathoc is an interactive tool, no need for a long leading timestamp. More generally, make timestamps optional in the logging mechanism so we can configure this with command-line flags or something down the track.
Diffstat (limited to 'pathod/pathoc.py')
-rw-r--r--pathod/pathoc.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pathod/pathoc.py b/pathod/pathoc.py
index 3eb91637..88405698 100644
--- a/pathod/pathoc.py
+++ b/pathod/pathoc.py
@@ -18,7 +18,7 @@ from netlib.exceptions import HttpException, TcpDisconnect, TcpTimeout, TlsExcep
NetlibException
from netlib.http import http1, http2
-from . import log, language
+from pathod import log, language
import logging
from netlib.tutils import treq
@@ -100,6 +100,7 @@ class WebsocketFrameReader(threading.Thread):
self.logger = log.ConnectionLogger(
self.logfp,
self.hexdump,
+ False,
rfile if showresp else None,
None
)
@@ -216,7 +217,8 @@ class Pathoc(tcp.TCPClient):
self.fp,
"HTTP/2 requires ALPN support. "
"Please use OpenSSL >= 1.0.2. "
- "Pathoc might not be working as expected without ALPN."
+ "Pathoc might not be working as expected without ALPN.",
+ timestamp = False
)
self.protocol = http2.HTTP2Protocol(self, dump_frames=self.http2_framedump)
else:
@@ -372,6 +374,7 @@ class Pathoc(tcp.TCPClient):
logger = log.ConnectionLogger(
self.fp,
self.hexdump,
+ False,
None,
self.wfile if self.showreq else None,
)
@@ -412,6 +415,7 @@ class Pathoc(tcp.TCPClient):
logger = log.ConnectionLogger(
self.fp,
self.hexdump,
+ False,
self.rfile if self.showresp else None,
self.wfile if self.showreq else None,
)