From 0d7ac4b1ded497aac7d478332fd4ac6224647c0b Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 30 Oct 2025 12:34:07 +0100 Subject: [PATCH] Add missing logger.info() and logger.debug() methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FIX: TypeError: z.info is not a function in production The logger object was missing .info() and .debug() methods that were being called in OffsetOrder.tsx and other components. This caused checkout to fail in production with "z.info is not a function" error. Added: - logger.info() - Info level logging (dev only) - logger.debug() - Debug level logging (dev only) All logger methods now follow the same pattern: - log, info, warn, debug: Only log in development - error: Always log (production + development) 🔒 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/utils/logger.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 0b94f1a..e411d15 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -10,6 +10,12 @@ export const logger = { } }, + info: (...args: any[]) => { + if (!config.isProduction) { + console.info(...args); + } + }, + error: (...args: any[]) => { // Always log errors console.error(...args); @@ -19,5 +25,11 @@ export const logger = { if (!config.isProduction) { console.warn(...args); } + }, + + debug: (...args: any[]) => { + if (!config.isProduction) { + console.debug(...args); + } } };