Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Logger
    • LoggerWithTarget

Callable

  • __call(): boolean
  • __call(...params: any[]): void

Index

Type aliases

LogLevel

LogLevel: LogLevelString | number

LogLevelString

LogLevelString: "trace" | "debug" | "info" | "warn" | "error" | "fatal"

Serializer

Serializer: function

Type declaration

    • (input: any): any
    • Parameters

      • input: any

      Returns any

Constructors

constructor

  • Parameters

    • options: LoggerOptions

    Returns LoggerWithTarget

Properties

DEBUG

DEBUG: number

ERROR

ERROR: number

FATAL

FATAL: number

INFO

INFO: number

TRACE

TRACE: number

WARN

WARN: number

child

child: function

Type declaration

debug

error

fatal

fields

fields: any

info

levelFromName

levelFromName: object

Type declaration

nameFromLevel

nameFromLevel: object

Type declaration

  • [level: number]: string

src

src: boolean

stdSerializers

stdSerializers: StdSerializers

target

target: Logger

trace

warn

Static defaultMaxListeners

defaultMaxListeners: number

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

addSerializers

  • addSerializers(serializers: Serializers): void
  • Parameters

    • serializers: Serializers

    Returns void

addStream

  • addStream(stream: Stream): void
  • Parameters

    • stream: Stream

    Returns void

createLogger

  • createLogger(options: LoggerOptions): Logger
  • Parameters

    • options: LoggerOptions

    Returns Logger

emit

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

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

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

level

  • level(): number
  • level(value: Logger.LogLevel): void
  • Returns number

  • Parameters

    • value: Logger.LogLevel

    Returns void

levels

  • levels(): number[]
  • levels(name: number | string): number
  • levels(name: number | string, value: Logger.LogLevel): void
  • Returns number[]

  • Parameters

    • name: number | string

    Returns number

  • Parameters

    • name: number | string
    • value: Logger.LogLevel

    Returns void

listenerCount

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

    • type: string | symbol

    Returns number

listeners

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

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

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

    • event: string | symbol

    Returns Function[]

removeAllListeners

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

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

reopenFileStreams

  • reopenFileStreams(): void
  • Returns void

resolveLevel

  • Parameters

    Returns number

safeCycles

  • safeCycles(): function
  • Returns function

      • (key: string, value: any): any
      • Parameters

        • key: string
        • value: any

        Returns any

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc