Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Logger

Hierarchy

  • Logger

Index

Constructors

constructor

  • Creates a new Logger instance

    Parameters

    • className: string

      The Class name associated with the logging instance

    • Optional options: LoggerOptions

      Optional logging settings

    Returns Logger

Properties

className

className: string

Methods

debug

  • debug(message: string, object?: unknown): void
  • Log a message at the debug level

    Parameters

    • message: string

      The message to log

    • Optional object: unknown

      Additional meta data to log

    Returns void

error

  • error(message: string, object?: unknown): void
  • Log a message at the error level

    Parameters

    • message: string

      The message to log

    • Optional object: unknown

      Additional meta data to log

    Returns void

info

  • info(message: string, object?: unknown): void
  • Log a message at the info level

    Parameters

    • message: string

      The message to log

    • Optional object: unknown

      Additional meta data to log

    Returns void

isDebug

  • isDebug(): boolean

isError

  • isError(): boolean

isInfo

  • isInfo(): boolean

isWarn

  • isWarn(): boolean

warn

  • warn(message: string, object?: unknown): void
  • Log a message at the warn level

    Parameters

    • message: string

      The message to log

    • Optional object: unknown

      Additional meta data to log

    Returns void

Static currentLogger

Static filter

  • filter(type: string, values: string[]): void
  • Filter log messages for a particular class

    Parameters

    • type: string

      The type of filter (currently only class)

    • values: string[]

      The filters to apply

    Returns void

Static reset

  • reset(): void
  • Resets the logger to default settings, error and no filtered classes

    Returns void

Static setCurrentLogger

Static setLevel

  • Set the current log level

    Parameters

    • newLevel: LoggerLevel

      Set current log level (debug, warn, info, error)

    Returns void

Generated using TypeDoc