@beholdio/ts-lambda-api - v2.4.8
    Preparing search index...

    Interface ILogger

    Describes a generic logging implementation.

    interface ILogger {
        format: LogFormat;
        level: LogLevel;
        debug(message: string, ...formatArgs: any[]): any;
        debugEnabled(): boolean;
        error(message: string, ...formatArgs: any[]): any;
        errorEnabled(): boolean;
        errorWithStack(message: string, ex: Error, ...formatArgs: any[]): any;
        fatal(message: string, ...formatArgs: any[]): any;
        fatalEnabled(): boolean;
        info(message: string, ...formatArgs: any[]): any;
        infoEnabled(): boolean;
        isOff(): boolean;
        levelEnabled(level: LogLevel): boolean;
        log(level: LogLevel, message: string, ...formatArgs: any[]): any;
        trace(message: string, ...formatArgs: any[]): any;
        traceEnabled(): boolean;
        warn(message: string, ...formatArgs: any[]): any;
        warnEnabled(): boolean;
    }
    Index

    Properties

    format: LogFormat

    See [[ServerLoggerConfig]]

    level: LogLevel

    See [[ServerLoggerConfig]]

    Methods

    • Log a debug level message.

      Parameters

      • message: string

        String which can contain sprintf style format placeholders.

      • ...formatArgs: any[]

        (Optional) Arguments which are passed to sprintf to format the message.

      Returns any

    • Log a error level message.

      Parameters

      • message: string

        String which can contain sprintf style format placeholders.

      • ...formatArgs: any[]

        (Optional) Arguments which are passed to sprintf to format the message.

      Returns any

    • Log a error level message with an associated error and stack trace.

      Parameters

      • message: string

        String which can contain sprintf style format placeholders.

      • ex: Error

        Error object associated with this error message.

      • ...formatArgs: any[]

        (Optional) Arguments which are passed to sprintf to format the message.

      Returns any

    • Log a fatal level message.

      Parameters

      • message: string

        String which can contain sprintf style format placeholders.

      • ...formatArgs: any[]

        (Optional) Arguments which are passed to sprintf to format the message.

      Returns any

    • Log a info level message.

      Parameters

      • message: string

        String which can contain sprintf style format placeholders.

      • ...formatArgs: any[]

        (Optional) Arguments which are passed to sprintf to format the message.

      Returns any

    • Log a message with a custom level.

      Parameters

      • level: LogLevel

        Level of the log message.

      • message: string

        String which can contain sprintf style format placeholders.

      • ...formatArgs: any[]

        (Optional) Arguments which are passed to sprintf to format the message.

      Returns any

    • Log a trace level message.

      Parameters

      • message: string

        String which can contain sprintf style format placeholders.

      • ...formatArgs: any[]

        (Optional) Arguments which are passed to sprintf to format the message.

      Returns any

    • Log a warn trace level message.

      Parameters

      • message: string

        String which can contain sprintf style format placeholders.

      • ...formatArgs: any[]

        (Optional) Arguments which are passed to sprintf to format the message.

      Returns any