Options
All
  • Public
  • Public/Protected
  • All
Menu

The Logger class allows output from the bots and services to any useful medium. Currently the only output is of that to the console.

Hierarchy

  • Logger

Index

Properties

Private _alertLevel

_alertLevel: number = _.parseInt(process.env.PROCBOT_ALERT_LEVEL) || AlertLevel.ERROR

Private _logLevel

_logLevel: number = _.parseInt(process.env.PROCBOT_LOG_LEVEL) || LogLevel.INFO

Private alertLevelStrings

alertLevelStrings: string[] = ['CRITICAL','ERROR']

Strings prepended to alerting output.

Private logLevelStrings

logLevelStrings: string[] = ['WARNING','INFO','DEBUG']

Strings prepended to logging output.

Accessors

alertLevel

logLevel

Methods

alert

  • alert(level: number, message: string): void
  • Alert output.

    Parameters

    • level: number

      The level that this message is of (ERROR, etc.).

    • message: string

      The actual alert message.

    Returns void

log

  • log(level: number, message: string, secrets?: string[]): void
  • Log output.

    Parameters

    • level: number

      The level that this message is of (INFO, etc.).

    • message: string

      The actual log message.

    • Optional secrets: string[]

      An optional array of strings to redact

    Returns void

Private output

  • output(level: number, classLevel: number, levelStrings: string[], message: string): void
  • Parameters

    • level: number
    • classLevel: number
    • levelStrings: string[]
    • message: string

    Returns void

Generated using TypeDoc