Skip to content

Commit aa6850f

Browse files
authored
default to debug level if NODE_ENV is unset (#6)
1 parent eb4c613 commit aa6850f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ export const config = createEnv({
1919
// Logging Configuration
2020
LOG_LEVEL: z
2121
.enum(["error", "warn", "info", "http", "verbose", "debug", "silly"])
22-
.default(process.env.NODE_ENV === "production" ? "info" : "debug"),
22+
.default(
23+
!process.env.NODE_ENV || process.env.NODE_ENV === "production"
24+
? "info"
25+
: "debug"
26+
),
2327
LOG_JSON: z.coerce.boolean().default(process.env.NODE_ENV === "production"),
2428
LOG_FILE: z.string().optional(),
2529
LOG_STDERR: z.coerce.boolean().default(true),

0 commit comments

Comments
 (0)