Interface LogConfiguration

interface LogConfiguration {
    dumpBacklog?: boolean;
    enabled?: boolean;
    level?:
        | Level
        | "emergency"
        | "alert"
        | "critical"
        | "error"
        | "warning"
        | "notice"
        | "info"
        | "debug";
    format(this: void, entry: Entry): string | string[];
    output(this: void, ...message: string[]): unknown;
}

Properties

dumpBacklog?: boolean

If set, output() all current entries after configure is done

false
enabled?: boolean

If false, log messages will not be recorded or outputted

false
level?:
    | Level
    | "emergency"
    | "alert"
    | "critical"
    | "error"
    | "warning"
    | "notice"
    | "info"
    | "debug"

The minimum level needed to output a message

Level.ALERT

Methods

  • Formats a log entry into a string

    Parameters

    Returns string | string[]

    [${ms / 1000}] ${message}

  • Outputs a log message

    Parameters

    • this: void
    • ...message: string[]

    Returns unknown

    console.error()