Logs messages on a specific level.

getLoggerFor on how to instantiate loggers.

interface SimpleLogger {
    log: ((level:
        | "error"
        | "warn"
        | "info"
        | "verbose"
        | "debug"
        | "silly", message: string, meta?: LogMetadata) => SimpleLogger);
}

Hierarchy (view full)

Properties

Properties

log: ((level:
    | "error"
    | "warn"
    | "info"
    | "verbose"
    | "debug"
    | "silly", message: string, meta?: LogMetadata) => SimpleLogger)

Log the given message at the given level. If the internal level is higher than the given level, the message may be voided.

Type declaration

    • (level, message, meta?): SimpleLogger
    • Parameters

      • level:
            | "error"
            | "warn"
            | "info"
            | "verbose"
            | "debug"
            | "silly"

        The level to log at.

      • message: string

        The message to log.

      • Optionalmeta: LogMetadata

        Optional metadata to include in the log message.

      Returns SimpleLogger