couchbase
    Preparing search index...

    Class CouchbaseLogger

    A safe wrapper around user-provided Logger implementations.

    This wrapper ensures that calling any logging method is always safe, even if the underlying logger is undefined or the underlying logger only implements a subset of methods.

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Creates a new CouchbaseLogger wrapper.

      Parameters

      • Optionallogger: Logger

        Optional user-provided logger implementation. Can be undefined or implement only a subset of methods.

      Returns CouchbaseLogger

    Methods

    • Logs a message at the DEBUG level if the underlying logger implements it.

      If the logger is undefined or doesn't implement debug, this is a no-op.

      Parameters

      • message: string

        The message to log.

      • ...args: any[]

        Optional additional arguments for formatting or context.

      Returns void

    • Logs a message at the ERROR level if the underlying logger implements it.

      If the logger is undefined or doesn't implement error, this is a no-op.

      Parameters

      • message: string

        The message to log.

      • ...args: any[]

        Optional additional arguments for formatting or context.

      Returns void

    • Logs a message at the INFO level if the underlying logger implements it.

      If the logger is undefined or doesn't implement info, this is a no-op.

      Parameters

      • message: string

        The message to log.

      • ...args: any[]

        Optional additional arguments for formatting or context.

      Returns void

    • Logs a message at the TRACE level if the underlying logger implements it.

      If the logger is undefined or doesn't implement trace, this is a no-op.

      Parameters

      • message: string

        The message to log.

      • ...args: any[]

        Optional additional arguments for formatting or context.

      Returns void

    • Logs a message at the WARN level if the underlying logger implements it.

      If the logger is undefined or doesn't implement warn, this is a no-op.

      Parameters

      • message: string

        The message to log.

      • ...args: any[]

        Optional additional arguments for formatting or context.

      Returns void