Skip to content

Commit

Permalink
chore: handle a kernel error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayideyia committed Aug 27, 2024
1 parent 13b0a55 commit bc846f6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/stores/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bc846f6

Please sign in to comment.