Optionaldoit: boolean
should the box reserve no column
const request = Loxer.m('HTTP').open('handleCheckout()'); // reserves a column
const span = Loxer.m('SVC').noColumn().open('submit()'); // reserves none
Loxer.of(span).add('total = 149.99');
Loxer.of(span).close('done');
Every open box reserves a vertical column in the box layout, and that column widens the box prefix of every other log for as long as the box stays open. That is the right trade for a box a reader follows - a request, a transaction, an async flow whose interleaving is the point. For a box that only marks an entry and an exit - a short wrapper span, one frame of a traced call stack - the columns carry nothing the open and close lines do not already say, and four nested spans push every log inside them four columns right.
A box opened with this reserves no column, so the logs around it render the prefix they would
render had it never been opened. It keeps everything else: its id, its module, its timing, its
Loxer.of(id) reachability, its history entry and its level semantics. Its own open and close
lines still carry their glyphs, so the flow's beginning and end stay visible.
Loxer.of(id) call on that box
inherits it without chaining this againboxLayoutStyle: 'off' is the opposite trade: it keeps the column's width and drops the glyphslox.columnFree to render such a box its own wayOptionaldoit: boolean
should the box reserve no column
Optionaloptions: PropsPrinterOptions
to configure the rendering
Loxer.printProps().log('restoring order', payment)
Loxer.printProps({ depth: 1 }).open('checkout', cart)
Loxer.printProps().error(error, payment)
Props are attached to every log that is called with them, and reach the output stream and the history whether or not this is chained. What it decides is whether the built-in console output renders them below the message, connected to the log's box column.
Loxer.printProps() and Loxer.printProps({}) render
alike. The parameter carries formatting configuration, not the decisionnull and 0 includedOutputLoxRenderer or PropsPrinter.of(lox).print(), reading lox.printProps to honor the requestOptionaloptions: PropsPrinterOptions
to configure the rendering
Optionaldoit: boolean
should the log be highlighted
Loxer.highlight().log(...)
Loxer.highlight().open(...)
Loxer.highlight().of(...)
Loxer.highlight().error(...)
rgb(70, 70, 70) by default.
The message keeps the color its severity gives it, so the two compose.doit?: boolean can conditionally highlight the log with true.module(...)Optionaldoit: boolean
should the log be highlighted
OptionalmoduleId: string
the key of the module from LoxerOptions.modules. undefined defaults to module "DEFAULT"
Loxer.module(string).log(...)
Loxer.module(string).open(...)
Loxer.module(string).of(...)
NONE, which will lead the log to not have the box layoutLoxer.module().log(...) the module will be DEFAULT,
which will lead the log to have a box layout but no nameLoxer.init(options)Loxer.init(options).highlight(...)string by default. Augment the LoxerModuleRegistry to have them
autocompleted and typo-checked against the modules of your projectOptionalmoduleId: string
the key of the module from LoxerOptions.modules. undefined defaults to module "DEFAULT"
Open a box without a column (shortcut)
Is a shortcut for Loxer.noColumn().