fix: prevent empty string from throwing error

This commit is contained in:
Henry
2026-03-13 23:08:46 +00:00
parent bd652ba6c9
commit b8d1fe230d

View File

@@ -1,7 +1,7 @@
import pino from "pino";
const isDev = process.env.NODE_ENV !== "production";
const level = process.env.LOG_LEVEL ?? (isDev ? "debug" : "info");
const level = process.env.LOG_LEVEL || (isDev ? "debug" : "info");
export const logger = pino({
level,