Options
All
  • Public
  • Public/Protected
  • All
Menu
     

Class ELOGR

Handles and Logs the Events of an Object

Hierarchy

  • ELOGR

Callable

  • __call(cli: any, key: PropertyKey, name: PropertyKey, handlers: LHandlers): ELOGR
  • Creates an instance of ELOGR.

    Parameters

    • cli: any

      An object to call & log methods

    • key: PropertyKey

      An Namspace identifier

    • name: PropertyKey

      The name of the Namespace

    • handlers: LHandlers

      A set of options & handlers for each Event

    Returns ELOGR

Index

Constructors

Methods

Constructors

constructor

  • new ELOGR(cli: any, key: PropertyKey, name: PropertyKey, handlers: LHandlers): ELOGR
  • Creates an instance of ELOGR.

    Parameters

    • cli: any

      An object to call & log methods

    • key: PropertyKey

      An Namspace identifier

    • name: PropertyKey

      The name of the Namespace

    • handlers: LHandlers

      A set of options & handlers for each Event

    Returns ELOGR

Methods

format

  • format(err?: Error, msg?: any): string
  • Formats the Event's log message

    Parameters

    • Optional err: Error

      The log message, if an error occurs

    • Optional msg: any

      The log message upon a successful Event

    Returns string

    The formatted message

log

  • log(options: object): function
  • log(options: object): function
  • log(options?: object): function
  • Returns a logging handler for the Event.

    Parameters

    • options: object

      The logging options.

      • kind: "err"
      • Optional msg?: string
      • Optional clr?: string
      • Optional name?: string
      • Optional key?: string
      • func: function
        • func(...any: any[]): any
        • Parameters

          • Rest ...any: any[]

          Returns any

    Returns function

    A logging handler for the Event.

      • (err: any, _res: any): void
      • Parameters

        • err: any
        • _res: any

        Returns void

  • Parameters

    • options: object
      • kind: "msg"
      • Optional msg?: string
      • Optional clr?: string
      • Optional name?: string
      • Optional key?: string
      • func: function
        • func(...any: any[]): any
        • Parameters

          • Rest ...any: any[]

          Returns any

    Returns function

      • (): void
      • Returns void

  • Parameters

    • Optional options: object
      • kind: "####"
      • Optional msg?: string
      • Optional clr?: string
      • Optional name?: string
      • Optional key?: string
      • func: function
        • func(...any: any[]): any
        • Parameters

          • Rest ...any: any[]

          Returns any

    Returns function

      • (...any: any[]): void
      • Parameters

        • Rest ...any: any[]

        Returns void