A logger.

Constructors

  • Constructs a new logger.

    Parameters

    • name: string

      Logger name

    • Optional level: LogLevel

      Logger level. Defaults to the global log level

    • Optional logFn: ((...data) => void)

      Logger function. Defaults to console.log

        • (...data): void
        • Parameters

          • Rest ...data: unknown[]

          Returns void

    Returns Logger

Methods

  • Checks whether this logger is enabled for the given the log level.

    Parameters

    • levelOrLabel: string | LogLevel

      The log level or level label.

    Returns boolean

Generated using TypeDoc