isLevelEnabled()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / isLevelEnabled
Function: isLevelEnabled()
Section titled “Function: isLevelEnabled()”isLevelEnabled(
level):boolean
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22713
Check if a specific log level is enabled
Parameters
Section titled “Parameters”Log level to check
Returns
Section titled “Returns”boolean
true if the level would produce output
Example
Section titled “Example”import { isLevelEnabled } from '@sip-protocol/sdk'
if (isLevelEnabled('debug')) { // Expensive debug computation const details = computeExpensiveDebugInfo() logger.debug(details, 'Debug info')}