From 93a2a4a772ad124e1effc7ba3c933350b3c092ee Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 3 Sep 2023 15:42:01 +0800 Subject: [PATCH] fix logging ui --- src/views/system/LoggingView.vue | 78 ++++++++++++++++---------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/src/views/system/LoggingView.vue b/src/views/system/LoggingView.vue index 75d52d71..7758f644 100644 --- a/src/views/system/LoggingView.vue +++ b/src/views/system/LoggingView.vue @@ -28,7 +28,7 @@ function startSSELogging() { function extractLogDetailsFromLogs(logs: string[]): { level: string; time: string; program: string; content: string }[] { const logDetails: { level: string; time: string; program: string; content: string }[] = [] - const logPattern = /^【(.*?)】.*\s(.*?)\s-\s(.*?)\s-\s(.*)$/ + const logPattern = /^【(.*?)】[0-9\-:]*\s(.*?)\s-\s(.*?)\s-\s(.*)$/ for (const log of logs) { const matches = RegExp(logPattern).exec(log) @@ -70,7 +70,7 @@ onMounted(() => {