Represents an interface for a logger.

interface ILogger {
    child<T>(metadata): ILogger;
    debug<T>(message, metadata?): void;
    error<T>(message, metadata?): void;
    info<T>(message, metadata?): void;
    warn<T>(message, metadata?): void;
}

Hierarchy (view full)

Methods

  • Creates a child logger with additional metadata.

    Type Parameters

    • T extends {}

      The type of metadata.

    Parameters

    • metadata: T

      The additional metadata to include in the child logger.

    Returns ILogger

    A new child logger.

  • Logs a debug message.

    Type Parameters

    • T

      The type of metadata.

    Parameters

    • message: string

      The debug message to log.

    • Optional metadata: T

      Additional metadata to include in the log (optional).

    Returns void

  • Logs an error message.

    Type Parameters

    • T

      The type of metadata.

    Parameters

    • message: string

      The error message to log.

    • Optional metadata: T

      Additional metadata to include in the log (optional).

    Returns void

  • Logs an informational message.

    Type Parameters

    • T

      The type of metadata.

    Parameters

    • message: string

      The informational message to log.

    • Optional metadata: T

      Additional metadata to include in the log (optional).

    Returns void

  • Logs a warning message.

    Type Parameters

    • T

      The type of metadata.

    Parameters

    • message: string

      The warning message to log.

    • Optional metadata: T

      Additional metadata to include in the log (optional).

    Returns void

Generated using TypeDoc