Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Console

Implements

Index

Constructors

constructor

  • new Console(mLevel?: string): Console

Properties

Private mColor

mColor: boolean

Private mIsOn

mIsOn: boolean

Private mLevel

mLevel: string

Private mPrefix

mPrefix: boolean

Static Readonly LEVELS

LEVELS: string[] = ["trace", "debug", "info", "warn", "error", "fatal", "off"]

Static Readonly LEVEL_DEFAULT

LEVEL_DEFAULT: "debug" = "debug"

Accessors

color

  • get color(): boolean
  • set color(isEnabled: boolean): void

level

  • get level(): string
  • set level(level: string): void

on

  • get on(): boolean
  • set on(isOn: boolean): void

prefix

  • get prefix(): boolean
  • set prefix(isEnabled: boolean): void

Methods

addContext

  • addContext(key: string, value: any): void

Private buildPrefix

  • buildPrefix(type: string): string

clearContext

  • clearContext(): void

debug

  • debug(message: any, ...args: any[]): string

error

  • error(message: any, ...args: any[]): string

fatal

  • fatal(message: any, ...args: any[]): string

Private format

  • format(data: string, ...args: any[]): string

info

  • info(message: any, ...args: any[]): string

isDebugEnabled

  • isDebugEnabled(): boolean

isErrorEnabled

  • isErrorEnabled(): boolean

isFatalEnabled

  • isFatalEnabled(): boolean

isFormatEnabled

  • isFormatEnabled(): boolean

isInfoEnabled

  • isInfoEnabled(): boolean

isLevelEnabled

  • isLevelEnabled(): boolean

isTraceEnabled

  • isTraceEnabled(): boolean

isWarnEnabled

  • isWarnEnabled(): boolean

removeContext

  • removeContext(key: string): void

trace

  • trace(message: any, ...args: any[]): string

warn

  • warn(message: any, ...args: any[]): string

Private writeStderr

  • writeStderr(message: string, ...args: any[]): string

Private writeStdout

  • writeStdout(message: string, ...args: any[]): string

Static getConsole

  • getConsole(category: string): Console

Static isValidLevel

  • isValidLevel(level: string): boolean

Static validateLevel

  • validateLevel(level: string): void

Generated using TypeDoc