diff --git a/client/src/utils/logger.ts b/client/src/utils/logger.ts index 6bc1d21db6..b025f4926c 100644 --- a/client/src/utils/logger.ts +++ b/client/src/utils/logger.ts @@ -9,7 +9,7 @@ const createLogFunction = ( type?: 'log' | 'warn' | 'error' | 'info' | 'debug' | 'dir', ): LogFunction => { return (...args: unknown[]) => { - if (isDevelopment || isLoggerEnabled) { + if (isLoggerEnabled || (import.meta.env.VITE_ENABLE_LOGGER == null && isDevelopment)) { const tag = typeof args[0] === 'string' ? args[0] : ''; if (shouldLog(tag)) { if (tag && typeof args[1] === 'string' && type === 'error') {