From c4715fa7e3648c00a591477d60e7efede068b54d Mon Sep 17 00:00:00 2001 From: bluwy Date: Thu, 6 Apr 2023 14:33:19 +0800 Subject: [PATCH] chore: improve debug log filtering --- packages/vite/src/node/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index 2bad4730961b62..2f73dfef78e32b 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -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) } } }