Skip to content

Commit

Permalink
chore: improve debug log filtering (#12763)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Apr 6, 2023
1 parent 037a6c7 commit da1cb02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vite/src/node/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ export function createDebugger(
}

if (enabled) {
return (msg: string, ...args: any[]) => {
if (!filter || msg.includes(filter)) {
log(msg, ...args)
return (...args: [string, ...any[]]) => {
if (!filter || args.some((a) => a?.includes(filter))) {
log(...args)
}
}
}
Expand Down

0 comments on commit da1cb02

Please sign in to comment.