Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Logger

Hierarchy

  • Logger

Index

Constructors

constructor

  • new Logger(__namedParameters: { context: Context; dateFormat: undefined | string; disabled: undefined | false | true; filename: undefined | string; instanceId: number; level: string; subcontext: undefined | string }): Logger
  • Parameters

    • __namedParameters: { context: Context; dateFormat: undefined | string; disabled: undefined | false | true; filename: undefined | string; instanceId: number; level: string; subcontext: undefined | string }
      • context: Context
      • dateFormat: undefined | string
      • disabled: undefined | false | true
      • filename: undefined | string
      • instanceId: number
      • level: string
      • subcontext: undefined | string

    Returns Logger

Properties

Private context

context: Context

Private Optional dateFormat

dateFormat: undefined | string

Private Optional filename

filename: undefined | string

Private instanceId

instanceId: number

Private level

level: string

Private Optional logger

logger: winston.Logger

Private Optional subcontext

subcontext: undefined | string

Static Readonly DISABLED_LOGGER

DISABLED_LOGGER: Logger = new Logger({ disabled: true })

Methods

alert

  • alert(msg: string): void

createSubLogger

  • createSubLogger(subcontext: string): Logger

debug

  • debug(msg: string): void

error

  • error(msg: Error | string, err?: any): void
  • Parameters

    • msg: Error | string
    • Optional err: any

    Returns void

Private getLevel

  • getLevel(level: string, colorize: boolean): string
  • Parameters

    • level: string
    • colorize: boolean

    Returns string

Private getLogFormat

  • getLogFormat(colorize: boolean, dateFormat?: undefined | string): Format
  • Parameters

    • colorize: boolean
    • Optional dateFormat: undefined | string

    Returns Format

info

  • info(msg: string): void

Private log

  • log(level: string, msg: string): void

trace

  • trace(msg: string): void

verbose

  • verbose(msg: string): void

warn

  • warn(msg: string): void

Static createLoggers

  • createLoggers(level: string, filename?: string, instanceId?: number, dateFormat?: undefined | string): Loggers
  • Parameters

    • level: string
    • Default value filename: string = ""
    • Default value instanceId: number = 0
    • Optional dateFormat: undefined | string

    Returns Loggers

Generated using TypeDoc