Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/log"

Index

Variables

Functions

Object literals

Variables

Const log

log: Logger<"fatal" | "error" | "warn" | "info" | "debug" | "alert" | "caution" | "notice" | "success"> & {} = createLogger('logger', {levels: ['fatal', 'error', 'warn', 'info', 'debug', 'alert', 'caution', 'notice', 'success'],transports: [new ConsoleTransport()]})

Functions

Const catchError

  • catchError(err: Error): void

Const colorize

  • colorize(key: string, val: string, template?: string): string
  • Parameters

    • key: string
    • val: string
    • Default value template: string = "{{key}}:"

    Returns string

Const symbolize

  • symbolize(key: string, val: string, prepend?: boolean): string
  • Parameters

    • key: string
    • val: string
    • Default value prepend: boolean = true

    Returns string

Object literals

Const styles

styles: object

debug

debug: StyleFunction = magentaBright

error

error: StyleFunction = redBright

info

info: StyleFunction = blueBright

warn

warn: StyleFunction = yellowBright

fatal

  • fatal(val: any): string

Const symbols

symbols: object

alert

alert: string = error

caution

caution: string = warning

notice

notice: string = info

success

success: string

Generated using TypeDoc