From e75e199334571d32111a35359993f3e70da8d077 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Wed, 22 Jan 2020 16:33:54 +0100 Subject: [PATCH] Fix multi-line log events display in web console --- plugins/Sidebar/ConsolePlugin.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/Sidebar/ConsolePlugin.py b/plugins/Sidebar/ConsolePlugin.py index 30d00fee..15f6a1ba 100644 --- a/plugins/Sidebar/ConsolePlugin.py +++ b/plugins/Sidebar/ConsolePlugin.py @@ -58,9 +58,16 @@ class UiWebsocketPlugin(object): assert SafeRe.isSafePattern(filter) filter_re = re.compile(".*" + filter) + last_match = False 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 + + if filter and not filter_re.match(line): + last_match = False + continue + last_match = True lines.append(line) num_found = len(lines)