Function: isLevelEnabled()
isLevelEnabled(
level):boolean
Whether a call at level would be emitted at the current
process.env.LOG_LEVEL threshold. Use before building expensive debug
payloads.
Parameters
Section titled “Parameters”"error" | "debug" | "info" | "warn"
Returns
Section titled “Returns”boolean
Example
Section titled “Example”if (isLevelEnabled("debug")) { log.debug("mounts:resolver", { contribution: await heavySnapshot() });}