From 7e9ec4e3f2df00d2c23eaac4057eaaa71733093b Mon Sep 17 00:00:00 2001 From: ysCha Date: Thu, 14 May 2026 14:55:05 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/logger.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/logger.js b/src/util/logger.js index e88b23ff..c096298c 100644 --- a/src/util/logger.js +++ b/src/util/logger.js @@ -1,5 +1,7 @@ // utils/logger.js -const isLoggingEnabled = process.env.NEXT_PUBLIC_ENABLE_LOGGING; +// [LOGGER-GUARD 2026-05-14] string 'false' 가 truthy 라 production 에서도 가드를 통과하던 버그 수정. +// 명시적 === 'true' 비교 → Next.js inline replacement + dead code elimination 으로 production 빌드에서 emit 호출 제거. +const isLoggingEnabled = process.env.NEXT_PUBLIC_ENABLE_LOGGING === 'true'; // [LOGGER-CALLER 2026-05-14] stack 에서 logger.js 이외의 첫 frame 을 추출해 prefix 로 붙임. // 페이지/hook/컴포넌트 어디서 찍힌 로그인지 콘솔에서 즉시 식별 가능. webpack chunk 매칭 위해 파일명만 추출. -- 2.47.2