(value: string | undefined, fallback: RuntimeLogLevel)
| 36 | } |
| 37 | |
| 38 | function normalizeLogLevel(value: string | undefined, fallback: RuntimeLogLevel): RuntimeLogLevel { |
| 39 | const lowered = String(value ?? "").toLowerCase(); |
| 40 | if ((RUNTIME_LOG_LEVELS as readonly string[]).includes(lowered)) { |
| 41 | return lowered as RuntimeLogLevel; |
| 42 | } |
| 43 | |
| 44 | return fallback; |
| 45 | } |
| 46 | |
| 47 | function resolveStartupLogLevel(): RuntimeLogLevel { |
| 48 | const legacyDebugLog = String(process.env.DEBUG_LOG || "").toLowerCase() === "true"; |
no outgoing calls
no test coverage detected