@launchdarkly/js-server-sdk-common - v2.26.1
    Preparing search index...

    Interface LDLogger

    The LaunchDarkly client logger interface.

    The LDOptions.logger property accepts any object that conforms to this interface. The SDK only uses four logging levels: error, warn, info, and debug. It will call the corresponding method of the LDLogger either with a single string argument, or with a format string and variable arguments in the format used by Node's util.format().

    The Winston logging package provides a logger that conforms to this interface, so if you have created a logger with Winston, you can simply put it into the LDOptions.logger property.

    If you do not provide a logger object, the SDK uses the basicLogger implementation with a minimum level of info.

    interface LDLogger {
        debug(...args: any[]): void;
        error(...args: any[]): void;
        info(...args: any[]): void;
        warn(...args: any[]): void;
    }

    Implemented by

    Index
    • The debug logger.

      Parameters

      • ...args: any[]

        A sequence of any JavaScript values.

      Returns void

    • The error logger.

      Parameters

      • ...args: any[]

        A sequence of any JavaScript values.

      Returns void

    • The info logger.

      Parameters

      • ...args: any[]

        A sequence of any JavaScript values.

      Returns void

    • The warning logger.

      Parameters

      • ...args: any[]

        A sequence of any JavaScript values.

      Returns void