Options
All
  • Public
  • Public/Protected
  • All
Menu

CategoryLogger. Methods ending with c are closure methods and will only be called when they need to be logged, this may be cheaper if some of your logging is expensive (network/calculating wise).

Hierarchy

  • CategoryLogger

Implemented by

Index

Methods

debug

  • debug(msg: string, ...categories: Category[]): void

debugc

  • debugc(msg: function, ...categories: Category[]): void

error

  • error(msg: string, error: Error | null, ...categories: Category[]): void

errorc

  • errorc(msg: function, error: function, ...categories: Category[]): void

fatal

  • fatal(msg: string, error: Error | null, ...categories: Category[]): void

fatalc

  • fatalc(msg: function, error: function, ...categories: Category[]): void

info

  • info(msg: string, ...categories: Category[]): void

infoc

  • infoc(msg: function, ...categories: Category[]): void

log

  • log(level: LogLevel, msg: string, error: Error | null, ...categories: Category[]): void

logc

  • logc(level: LogLevel, msg: function, error: function, ...categories: Category[]): void

resolved

  • resolved(msg: string, error: Error | null, ...categories: Category[]): void
  • This is a special opinionated way to log, that an exception (Error) occurred, but your code dealt with it in a proper way. That way we can say, there was an Error/Exception but we resolved it. This will be logged as: Error (resolved) in the log.

    Parameters

    • msg: string

      Message

    • error: Error | null

      Error

    • Rest ...categories: Category[]

      Categories to log for

    Returns void

resolvedc

  • resolvedc(msg: function, error: function, ...categories: Category[]): void
  • This is a special opinionated way to log, that an exception (Error) occurred, but your code dealt with it in a proper way. That way we can say, there was an Error/Exception but we resolved it. This will be logged as: Error (resolved) in the log.

    Parameters

    • msg: function

      Message as closure

        • (): string
        • Returns string

    • error: function

      Error as closure

        • (): Error | null
        • Returns Error | null

    • Rest ...categories: Category[]

      Categories to log for

    Returns void

trace

  • trace(msg: string, ...categories: Category[]): void

tracec

  • tracec(msg: function, ...categories: Category[]): void

warn

  • warn(msg: string, ...categories: Category[]): void

warnc

  • warnc(msg: function, ...categories: Category[]): void

Generated using TypeDoc