Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LogsService

A service that sends log entries to the client.

Hierarchy

  • LogsServiceBase
    • LogsService

Index

Constructors

constructor

Properties

Protected resources

resources: AppResources

Methods

StreamHistory

  • StreamHistory(start?: number): Promise<void>
  • Sends existing logs to the client.

    Parameters

    • Default value start: number = -1

    Returns Promise<void>

addListener

  • addListener(event: string, listener: Listener): this
  • Parameters

    • event: string
    • listener: Listener

    Returns this

emit

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

    • event: string | string[]
    • Rest ...values: any[]

    Returns boolean

emitAsync

  • emitAsync(event: string | string[], ...values: any[]): Promise<any[]>
  • Parameters

    • event: string | string[]
    • Rest ...values: any[]

    Returns Promise<any[]>

Private emitLogEntry

  • emitLogEntry(rawLogEntry: any): void

eventNames

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

listeners

  • listeners(event: string | string[]): Listener[]
  • Parameters

    • event: string | string[]

    Returns Listener[]

listenersAny

  • listenersAny(): Listener[]
  • Returns Listener[]

many

  • many(event: string | string[], timesToListen: number, listener: Listener): this
  • Parameters

    • event: string | string[]
    • timesToListen: number
    • listener: Listener

    Returns this

off

  • off(event: string, listener: Listener): this
  • Parameters

    • event: string
    • listener: Listener

    Returns this

offAny

  • offAny(listener: Listener): this
  • Parameters

    • listener: Listener

    Returns this

on

  • on(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

onAny

  • onAny(listener: EventAndListener): this
  • Parameters

    • listener: EventAndListener

    Returns this

once

  • once(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

prependAny

  • prependAny(listener: EventAndListener): this
  • Parameters

    • listener: EventAndListener

    Returns this

prependListener

  • prependListener(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

prependMany

  • prependMany(event: string | string[], timesToListen: number, listener: Listener): this
  • Parameters

    • event: string | string[]
    • timesToListen: number
    • listener: Listener

    Returns this

prependOnceListener

  • prependOnceListener(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

removeAllListeners

  • removeAllListeners(event?: string | eventNS): this
  • Parameters

    • Optional event: string | eventNS

    Returns this

removeListener

  • removeListener(event: string | string[], listener: Listener): this
  • Parameters

    • event: string | string[]
    • listener: Listener

    Returns this

setMaxListeners

  • setMaxListeners(n: number): void
  • Parameters

    • n: number

    Returns void

Generated using TypeDoc