diff options
Diffstat (limited to 'libmproxy/dump.py')
-rw-r--r-- | libmproxy/dump.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libmproxy/dump.py b/libmproxy/dump.py index 36f54608..a58405ed 100644 --- a/libmproxy/dump.py +++ b/libmproxy/dump.py @@ -143,6 +143,11 @@ class DumpMaster(flow.FlowMaster): def add_event(self, e, level="info"): if self.eventlog: print >> self.outfile, e + self.outfile.flush() + + def handle_log(self, l): + self.add_event(l.msg) + l._ack() def handle_request(self, r): f = flow.FlowMaster.handle_request(self, r) @@ -196,6 +201,8 @@ class DumpMaster(flow.FlowMaster): print >> self.outfile print >> self.outfile, result print >> self.outfile, "\n" + if self.o.verbosity: + self.outfile.flush() self.state.delete_flow(f) if self.o.wfile: |