Add missing logger.info() and logger.debug() methods
All checks were successful
Build and Push Docker Images / docker (push) Successful in 43s

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 <noreply@anthropic.com>
This commit is contained in:
Matt 2025-10-30 12:34:07 +01:00
parent 04bfef4391
commit 0d7ac4b1de

View File

@ -10,6 +10,12 @@ export const logger = {
} }
}, },
info: (...args: any[]) => {
if (!config.isProduction) {
console.info(...args);
}
},
error: (...args: any[]) => { error: (...args: any[]) => {
// Always log errors // Always log errors
console.error(...args); console.error(...args);
@ -19,5 +25,11 @@ export const logger = {
if (!config.isProduction) { if (!config.isProduction) {
console.warn(...args); console.warn(...args);
} }
},
debug: (...args: any[]) => {
if (!config.isProduction) {
console.debug(...args);
}
} }
}; };