Used to log at given levels.

interface Logger {
    debug(...data): void;
    error(...data): void;
    info(...data): void;
    isAnyEnabled(): boolean;
    isDebugEnabled(): boolean;
    isEnabled(logLevel): boolean;
    isErrorEnabled(): boolean;
    isInfoEnabled(): boolean;
    isWarnEnabled(): boolean;
    log(...data): void;
    warn(...data): void;
}

Methods

  • Logs the given data at debug level if enabled.

    Parameters

    • Rest ...data: unknown[]

      data to log, such as a message and some objects.

    Returns void

  • Logs the given data at error level if enabled.

    Parameters

    • Rest ...data: unknown[]

      data to log, such as a message and some objects.

    Returns void

  • Logs the given data at info level if enabled.

    Parameters

    • Rest ...data: unknown[]

      data to log, such as a message and some objects.

    Returns void

  • Check, if logging is enabled in general.

    Returns boolean

    true, if logging is enabled; false otherwise.

  • Check, if debug logging is enabled.

    Returns boolean

    true, if debug logging is enabled; false otherwise.

  • Check if logging of given level or below is enabled.

    Parameters

    Returns boolean

    true, if logging at given level (or below) is enabled; false otherwise.

  • Check, if error logging or below is enabled.

    Returns boolean

    true, if error logging (or below) is enabled; false otherwise.

  • Check, if info logging or below is enabled.

    Returns boolean

    true, if info logging (or below) is enabled; false otherwise.

  • Check, if warn logging or below is enabled.

    Returns boolean

    true, if warn logging (or below) is enabled; false otherwise.

  • Logs the given data at if logging is enabled. Thus, unless the log level is set to none, this will be logged.

    Parameters

    • Rest ...data: unknown[]

      data to log, such as a message and some objects.

    Returns void

  • Logs the given data at warn level if enabled.

    Parameters

    • Rest ...data: unknown[]

      data to log, such as a message and some objects.

    Returns void