Back to Node Auth0

Class Logger

docs/classes/management.SDK.Logger.html

5.9.12.8 KB
Original Source

Class Logger

Logger class that provides level-based logging functionality.

Index

Constructors

constructor

Methods

shouldLogisDebugdebugisInfoinfoisWarnwarnisErrorerror

Constructors

constructor

new Logger(config: Required<LogConfig>): Logger

Creates a new logger instance.

Parameters

Logger configuration

Returns Logger

Methods

shouldLog

shouldLog(level: LogLevel): boolean

Checks if a log level should be output based on configuration.

Parameters

The log level to check

Returns boolean

True if the level should be logged

isDebug

isDebug(): boolean

Checks if debug logging is enabled.

Returns boolean

True if debug logs should be output

debug

debug(message: string, ...args: unknown[]): void

Logs a debug message if debug logging is enabled.

Parameters

  • message: string

The message to log

  • ...args: unknown[]

Additional arguments to log

Returns void

isInfo

isInfo(): boolean

Checks if info logging is enabled.

Returns boolean

True if info logs should be output

info

info(message: string, ...args: unknown[]): void

Logs an info message if info logging is enabled.

Parameters

  • message: string

The message to log

  • ...args: unknown[]

Additional arguments to log

Returns void

isWarn

isWarn(): boolean

Checks if warning logging is enabled.

Returns boolean

True if warning logs should be output

warn

warn(message: string, ...args: unknown[]): void

Logs a warning message if warning logging is enabled.

Parameters

  • message: string

The message to log

  • ...args: unknown[]

Additional arguments to log

Returns void

isError

isError(): boolean

Checks if error logging is enabled.

Returns boolean

True if error logs should be output

error

error(message: string, ...args: unknown[]): void

Logs an error message if error logging is enabled.

Parameters

  • message: string

The message to log

  • ...args: unknown[]

Additional arguments to log

Returns void

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Methods shouldLogisDebugdebugisInfoinfoisWarnwarnisErrorerror