Loxer - v3.0.0
    Preparing search index...

    Class BoxFactory

    A Factory used to construct the BoxLayout for *Loxes

    Index
    • The column, relative to the start of the box, at which this log's own marker sits — i.e. the edge / single segment (openEdge, single or closeEdge) produced by getOpenLogBox / getOfLogBox for the log itself. Everything before it is the vertical line of an enclosing open box; everything after it is a cross / horizontal. A props box uses this to connect to the log's box column (branching off the box layout) instead of floating out at the message.

      Parameters

      • box: Box

        the Box of an OutputLox or ErrorLox

      Returns number

      the index of the log's marker, or 0 for a box without one (NONE / hidden logs)

    • Creates a string version of the given *Lox box.

      const lox: OutputLox = ... // `event.lox` in an output stream (also `ErrorLox`)
      const box = BoxFactory.getBoxString(lox.box, { colored: true });

      Parameters

      • box: Box

        the Box of an OutputLox or ErrorLox

      • options: { colored?: boolean; boxLayoutStyle?: BoxLayoutStyle } = {}

        selects colored output and a fallback box layout

      Returns string

      a stringified version of the given box