Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ErrorLox

This is a log streamed to the devErroror prodError output stream defined at the LoxerCallbacks.

Hierarchy

Properties

error

error: Error

the error that was initially given, or created by Loxer

openLoxes

openLoxes: OutputLox[] = []

a list of opened OutputLox which have not been closed until the occurrence of this error log

id

id: number

the internal identifier of the log

  • this id is used to reference .of(id) logs to opening logs

message

message: string

the message of the log

highlighted

highlighted: boolean

determines if the log was highlighted with Loxer.highlight() or Loxer.h()

item

item: ItemType

an optional item like the console.log(message,item)

itemOptions

itemOptions: undefined | ItemOptions

options to configure the (default) output of the item

type

type: LoxType

the {@link LoxType type} of the log

moduleId

moduleId: string

the corresponding key of a module from LoxerOptions.modules

  • will be DEFAULT if logged with empty module Loxer.module() or Loxer.m()
  • will be NONE if logged without a module
  • will be INVALID if logged with a module that was not defined at LoxerOptions.modules

level

level: LevelType

the log level that was given with Loxer.level(number) or Loxer.l(number)

timestamp

timestamp: Date

the {@link Date} the log was declared

box

box: Box = []

the box layout of the log which an array of type { box: keyof BoxSymbol; color: string }, where:

  • keyof BoxSymbol is a string which represents the form of the box segment (character)
  • color is the string color of the box segment (represents the corresponding module color)

timeText

timeText: string = ''

a string that represents the time consumption from the opening log's timestamp until this log appeared

  • is '' when the log is a single Loxer.log() or an opening log itself

timeConsumption

timeConsumption: undefined | number

the time consumption (in ms) from the opening log's timestamp until this log appeared

  • is undefined when the log is a single Loxer.log() or an opening log itself

hidden

hidden: boolean = false

determines if the log has not fulfilled the level that the corresponding module has set

module

module: ExtendedModule = ...

the corresponding module of this Lox

Methods

equals

  • equals(obj: unknown): boolean
  • compares another lox with this one. Loxes are equal if their id is the same

    Parameters

    • obj: unknown

      to compare on equality

    Returns boolean

    true if both have the same id

Static resetStaticRunningId

  • resetStaticRunningId(): void

Accessors

moduleText

  • get moduleText(): string
  • Returns string

Generated using TypeDoc