Skip to content

Commit

Permalink
fix(ui): better regex matching when parsing logs (#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
danshilm committed Mar 19, 2021
1 parent 8c51c28 commit 2d737f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/routes/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ settingsRoutes.get(

const timestamp = line.match(new RegExp(/^.{24}/)) || [];
const level = line.match(new RegExp(/\s\[\w+\]/)) || [];
const label = line.match(new RegExp(/[^\s]\[\w+\s*\w*\]/)) || [];
const label = line.match(new RegExp(/\]\[.+\]/)) || [];
const message = line.match(new RegExp(/:\s([^{}]+)({.*})?/)) || [];

if (level.length && filter.includes(level[0].slice(2, -1))) {
Expand Down

0 comments on commit 2d737f2

Please sign in to comment.