shouldLog function
Last updated: 2026-03-01T23:25:47.125Z
Location
Metrics
LOC: 5
Complexity: 5
Params: 1
Signature
shouldLog(level: LogLevel): : boolean
Source Code
function shouldLog(level: LogLevel): boolean {
// audit, warn and error are always visible so critical issues surface even without debugLog
if (level === "error" || level === "warn" || level === "audit") return true;
return state.enabled && LEVEL_PRIORITY[level] >= LEVEL_PRIORITY[state.level];
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| flushBuffer | calls |
| emit | calls |