ILogger interface for all logging implementations

Hierarchy

Implements

Constructors

Properties

#config: ILoggerConfig
#console: Console
closeLevel: string = ']'
openLevel: string = '['

Methods

  • Implementation for a Log message flagged at the Debug log level

    Parameters

    • message: string
    • Rest ...args: unknown[]

      extra objects/values to include with the log message

    Returns void

  • Implementation for a Log message flagged at the Error log level

    Parameters

    • message: string
    • Rest ...args: unknown[]

      extra objects/values to include with the log message

    Returns void

  • Implementation for a Log message flagged at the Informational log level

    Parameters

    • message: string
    • Rest ...args: unknown[]

      extra objects/values to include with the log message

    Returns void

  • Implementation for a Log message flagged at the Trace log level

    Parameters

    • message: string
    • Rest ...args: unknown[]

      extra objects/values to include with the log message

    Returns void

  • Implementation for a Log message flagged at the Warning log level

    Parameters

    • message: string
    • Rest ...args: unknown[]

      extra objects/values to include with the log message

    Returns void

  • Rescope the logger with the provided name. Used for tagging the logger.

    Parameters

    • name: string

      The tag the logger should be given

    Returns ILogger & IDisposable

    Example

    Use the scope tool inside a 'using' to scope logging to a specific method.
    return using(() => logger.scope("theNameOfMyScope"), logger =>
    {
    logger.debug("Log something here");
    });

Generated using TypeDoc