Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tools/submission/log_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,16 @@ def get_dict(self):
else:
self.logger.warning(
"There are multiple messages with key {:} in the log. Emprically choosing the first one.".format(
key
message["key"]
)
)
return result

def dump(self, output_path):
"""
Dump the entire log as a json file.
"""
with open(log_path, "w") as f:
with open(output_path, "w") as f:
json.dump(self.messages, f, indent=4)

def num_messages(self):
Expand Down
Loading