From bc846f6736f71a0ad24579cc75ff60ead3543e47 Mon Sep 17 00:00:00 2001 From: Ayideyia <150233177+Ayideyia@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:07:36 +0800 Subject: [PATCH] chore: handle a kernel error message --- frontend/src/stores/logs.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/stores/logs.ts b/frontend/src/stores/logs.ts index fec2ab11..3e15444a 100644 --- a/frontend/src/stores/logs.ts +++ b/frontend/src/stores/logs.ts @@ -21,7 +21,13 @@ export const useLogsStore = defineStore('logs', () => { const regExp = /time="([^"]*)" level=([^ ]*) msg="([^"]*)"/ const recordKernelLog = (msg: string) => { const match = msg.match(regExp) - if (msg.includes('level=error') || msg.includes('Parse config error')) { + if ( + (msg.includes('level=error') || msg.includes('Parse config error')) && + /** + * Remove it if the kernel has already fixed this bug + */ + !msg.includes('PrepareUIPath error') + ) { message.error(msg) } if (match) {