Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Logger

A logger.

Hierarchy

  • EventEmitter
    • Logger

Implemented by

Index

Properties

Readonly alert

Logs an alert message.

Readonly crit

Logs a critical message.

Readonly debug

Logs a debug message.

Readonly emerg

Logs an emergency message.

Readonly err

Logs an error message.

Readonly info

Logs an info message.

Readonly log

log: (type: LogType, msg: any, tag?: string) => void | PromiseLike<void>

Logs a message.

param

type.

param

The message to log.

param

The additional tag.

Type declaration

    • (type: LogType, msg: any, tag?: string): void | PromiseLike<void>
    • Parameters

      • type: LogType
      • msg: any
      • Optional tag: string

      Returns void | PromiseLike<void>

Readonly notice

Logs a note message.

Readonly trace

Logs a trace message.

Readonly warn

Logs a warning message.

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): Logger
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Logger

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(event: string | symbol): number
  • Parameters

    • event: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): Logger
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Logger

on

  • on(event: string | symbol, listener: (...args: any[]) => void): Logger
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Logger

once

  • once(event: string | symbol, listener: (...args: any[]) => void): Logger
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Logger

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): Logger
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Logger

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): Logger
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Logger

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): Logger
  • Parameters

    • Optional event: string | symbol

    Returns Logger

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): Logger
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Logger

setMaxListeners

  • setMaxListeners(n: number): Logger
  • Parameters

    • n: number

    Returns Logger

Generated using TypeDoc