Fixed issue with log entries without exception stack

pull/1334/head
morpheus65535 4 years ago
parent 54eb0fc174
commit ac8eb62de0

@ -521,8 +521,9 @@ class SystemLogs(Resource):
log["timestamp"] = lin[0] log["timestamp"] = lin[0]
log["type"] = lin[1].rstrip() log["type"] = lin[1].rstrip()
log["message"] = lin[3] log["message"] = lin[3]
if lin[4] != '\n': if len(lin) > 4:
log['exception'] = lin[4].strip('\'').replace(' ', '\u2003\u2003') if lin[4] != '\n':
log['exception'] = lin[4].strip('\'').replace(' ', '\u2003\u2003')
logs.append(log) logs.append(log)
logs.reverse() logs.reverse()
return jsonify(data=logs) return jsonify(data=logs)

Loading…
Cancel
Save