mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Add a ctx.log on finish
This commit is contained in:
parent
456f80d862
commit
23b9ef799e
@ -120,10 +120,12 @@ def done():
|
||||
mitmproxy.ctx.log(pprint.pformat(HAR))
|
||||
# TODO: .zhar compression
|
||||
else:
|
||||
with open(dump_file, "w") as f:
|
||||
f.write(json.dumps(HAR, indent=2))
|
||||
json_dump = json.dumps(HAR, indent=2)
|
||||
|
||||
# TODO: Log results via mitmproxy.ctx.log
|
||||
with open(dump_file, "w") as f:
|
||||
f.write(json_dump)
|
||||
|
||||
mitmproxy.ctx.log("HAR log finished (wrote %s bytes to file)" % len(json_dump))
|
||||
|
||||
|
||||
def format_datetime(dt):
|
||||
|
Loading…
Reference in New Issue
Block a user