Fix multi-line log events display in web console
This commit is contained in:
parent
2b7aebd89d
commit
e75e199334
1 changed files with 8 additions and 1 deletions
|
@ -58,9 +58,16 @@ class UiWebsocketPlugin(object):
|
||||||
assert SafeRe.isSafePattern(filter)
|
assert SafeRe.isSafePattern(filter)
|
||||||
filter_re = re.compile(".*" + filter)
|
filter_re = re.compile(".*" + filter)
|
||||||
|
|
||||||
|
last_match = False
|
||||||
for line in log_file:
|
for line in log_file:
|
||||||
if filter and not filter_re.match(line):
|
if not line.startswith("[") and last_match: # Multi-line log entry
|
||||||
|
lines.append(line.replace(" ", " "))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if filter and not filter_re.match(line):
|
||||||
|
last_match = False
|
||||||
|
continue
|
||||||
|
last_match = True
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
|
|
||||||
num_found = len(lines)
|
num_found = len(lines)
|
||||||
|
|
Loading…
Reference in a new issue