aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-03-12 22:13:00 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-03-12 22:13:00 +0100
commitaefb30ea60255166a4d6b3da8e669a4e89485f6e (patch)
treebd80ee24383c530571d196100a70810438d3cb9e /libmproxy
parent14db30080f17762bc6bb9d75c5d90bf51494b873 (diff)
downloadmitmproxy-aefb30ea60255166a4d6b3da8e669a4e89485f6e.tar.gz
mitmproxy-aefb30ea60255166a4d6b3da8e669a4e89485f6e.tar.bz2
mitmproxy-aefb30ea60255166a4d6b3da8e669a4e89485f6e.zip
restrict -e to mitmproxy only (not mitmdump)
Diffstat (limited to 'libmproxy')
-rw-r--r--libmproxy/cmdline.py6
-rw-r--r--libmproxy/console/flowlist.py2
-rw-r--r--libmproxy/dump.py8
-rw-r--r--libmproxy/script.py5
4 files changed, 7 insertions, 14 deletions
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py
index c2911a6b..6c0b1ae8 100644
--- a/libmproxy/cmdline.py
+++ b/libmproxy/cmdline.py
@@ -161,7 +161,6 @@ def get_common_options(options):
anticache = options.anticache,
anticomp = options.anticomp,
client_replay = options.client_replay,
- eventlog = options.eventlog,
kill = options.kill,
no_server = options.no_server,
refresh_server_playback = not options.norefresh,
@@ -197,11 +196,6 @@ def common_options(parser):
help = "Configuration directory. (~/.mitmproxy)"
)
parser.add_argument(
- "-e",
- action="store_true", dest="eventlog",
- help="Show event log."
- )
- parser.add_argument(
"-n",
action="store_true", dest="no_server",
help="Don't start a proxy server."
diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py
index deddae60..e0330171 100644
--- a/libmproxy/console/flowlist.py
+++ b/libmproxy/console/flowlist.py
@@ -69,7 +69,7 @@ class BodyPile(urwid.Pile):
else:
self.widget_list[1].header = self.inactive_header
key = None
- elif key == "v":
+ elif key == "e":
self.master.toggle_eventlog()
key = None
diff --git a/libmproxy/dump.py b/libmproxy/dump.py
index 6573d97d..c200e50e 100644
--- a/libmproxy/dump.py
+++ b/libmproxy/dump.py
@@ -15,7 +15,6 @@ class Options(object):
"anticache",
"anticomp",
"client_replay",
- "eventlog",
"keepserving",
"kill",
"no_server",
@@ -66,7 +65,6 @@ class DumpMaster(flow.FlowMaster):
self.o = options
self.anticache = options.anticache
self.anticomp = options.anticomp
- self.eventlog = options.eventlog
self.showhost = options.showhost
self.refresh_server_playback = options.refresh_server_playback
@@ -142,9 +140,9 @@ class DumpMaster(flow.FlowMaster):
return flows
def add_event(self, e, level="info"):
- if self.eventlog:
- print >> self.outfile, e
- self.outfile.flush()
+ #FIXME refactor_loglevel
+ print >> self.outfile, e
+ self.outfile.flush()
def indent(self, n, t):
l = str(t).strip().split("\n")
diff --git a/libmproxy/script.py b/libmproxy/script.py
index 9638fdec..bafa8ba9 100644
--- a/libmproxy/script.py
+++ b/libmproxy/script.py
@@ -15,9 +15,10 @@ class ScriptContext:
Logs an event.
How this is handled depends on the front-end. mitmdump will display
- events if the eventlog flag ("-e") was passed. mitmproxy sends
- output to the eventlog for display ("v" keyboard shortcut).
+ events if the v flag ("-e") was passed. mitmproxy sends
+ output to the eventlog for display ("e" keyboard shortcut).
"""
+ #FIXME refactor_loglevel
self._master.add_event(*args, **kwargs)
def duplicate_flow(self, f):