Loxer - v3.0.0
    Preparing search index...

    Class ErrorLox

    An error emitted to the configured output stream as an event with kind: 'error'.

    Hierarchy (View Summary)

    Index
    error: Error

    the error that was initially given, or created by Loxer

    openLoxes: OutputLox[] = []

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

    id: number

    the internal identifier of the log

    • this id is used to reference .of(id) logs to opening logs
    • handed out by the Loxer instance the log belongs to, so ids stay unique within it
    message: string

    the message of the log

    highlighted: boolean

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

    props: unknown[]

    the values the log was called with, after its message - like console.log(message,...props)

    • always an array: a log without props carries an empty one
    • every prop reaches the output stream and history by reference, unchanged
    printProps: PropsPrinterOptions | undefined

    the configuration for rendering Lox.props in the built-in output, as passed to Loxer.printProps(...) / Loxer.pp(...)

    • undefined means the call did not ask for its props to be rendered
    • an empty object is a rendering request with default configuration
    type: LoxType

    the type of the log

    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: LogLevel

    the LogLevel of the log

    • 'error' for every Loxer.error() / Loxer.of(...).error()
    • 'info' for Loxer.log() / Loxer.open()
    • the named level for Loxer.warn/info/debug(...), their .open(), and Loxer.of(...).warn/info/debug()
    • the opening log's level for Loxer.of(...).add() / .close()
    timestamp: Date

    the Date the log was declared

    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: 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: number | undefined

    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: boolean = false

    determines if the log's level sits past the level its module logs up to — a hidden log enters neither the history nor the visible box layout

    • always false on an ErrorLox: errors are output whatever the level says
    module: ExtendedModule = DEFAULT_EXTENDED_MODULE

    the corresponding module of this Lox

    • get moduleText(): string

      Returns string

    • 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