Commit 15cfc4e7 authored by i317280's avatar i317280

feat: update

parent c2ad5098
...@@ -89,12 +89,12 @@ class ServerReplayRecorder(ReplayRecorder): ...@@ -89,12 +89,12 @@ class ServerReplayRecorder(ReplayRecorder):
super().record_replay(data_set) super().record_replay(data_set)
for data in data_set: for data in data_set:
try: try:
ServerReplayRecorder.filelist[data["session"]].write(str(data)) ServerReplayRecorder.filelist[data["session"]].write(str(data) + '\n')
except KeyError: except KeyError:
logger.error("session ({})file does not exist!".format(data["session"])) logger.error("session ({})file does not exist!".format(data["session"]))
def session_start(self, session_id): def session_start(self, session_id):
ServerReplayRecorder.filelist[session_id] = open(session_id + '.log', 'a') ServerReplayRecorder.filelist[session_id] = open('logs/' + session_id + '.log', 'a')
print("When session {} start exec".format(session_id)) print("When session {} start exec".format(session_id))
def session_end(self, session_id): def session_end(self, session_id):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment