fix(api): fall back to defaults when LOG_LEVEL or MAIL_FROM are empty
Compose defines unset optional variables as empty strings, so `??` kept "" and Pino crashed on startup with an empty level, leaving the api container unhealthy on Dokploy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ const isProduction = process.env.NODE_ENV === 'production'
|
||||
* never use `console.log` in the backend.
|
||||
*/
|
||||
export const logger = pino({
|
||||
level: process.env.LOG_LEVEL ?? (isProduction ? 'info' : 'debug'),
|
||||
level: process.env.LOG_LEVEL || (isProduction ? 'info' : 'debug'),
|
||||
...(isProduction
|
||||
? {}
|
||||
: {
|
||||
|
||||
Reference in New Issue
Block a user