Loxer.info('user loaded');
Loxer.info.open('loading user');
'info'. See LevelMethods.'info' is the level LogMethods.log and LogMethods.open use themselves, so
Loxer.info(...) writes the same log as Loxer.log(...) and Loxer.info.open(...) the same box
as Loxer.open(...).
Loxer.debug('cache miss');
Loxer.debug.open('recalculating');
'debug'. See LevelMethods.'debug' is the last level a module reaches, so a module has to ask for it with
devLevel: 'debug'; the built-in modules stop at 'info'.
Loxer.log('Hello World');
console.log(), but:'info', exactly like Loxer.info().highlight().log(...) or .h().log(...) to highlight the log.module().log(...) or .m().log(...) to assign a module to the log - otherwise it's NONELoxer.h().m('Account').log(...) Loxer.log('restoring order', payment, cart);
Loxer.log(payment) reads instead of printing [object Object]Optionalmessage: unknown
to log, of any type
any number of values to attach to the log
Loxer.error(new Error('Goodbye World!'));
console.error(), but:kind: 'error' when one is suppliedError will be appended to the output errorstring | number | boolean | object, then a new Error(message.toString())
will be created and appended.module().error(...) or .m().error(...) to assign a module to the error - otherwise
it's NONE.highlight().error(...) or .h().error(...) does not color the message differently but append
the stack to the default console outputdevLevel: 'error' reports its errors and nothing else. The emitted log carries
level: 'error'.Loxer.error.open(): an error is a single event rather than a box (see
BoxLevel)an Error or string | number| boolean | object (converted to an Error)
any number of values to attach to the log
Loxer.namedError('CheckoutError', 'the cart was empty', cart);
Loxer.error(new NamedError(name, message)), with props.message aloneLoxer.error(new NamedError(name, message, caught), ...props)the Error.name of the created error
the Error.message of the created error
any number of values to attach to the log
const loxId = Loxer.open('Open World!')
typeof number) that can be used with Loxer.of(id) to assign other logs to it.highlight().open(...) or .h().open(...) to highlight the log'info'. For another level use that level's .open(), e.g.
Loxer.debug.open(...) — see LevelMethods.module().open(...) or .m().open(...) to assign a module to the log - otherwise it's NONELoxer.h().m('Account').debug.open(...)Optionalmessage: unknown
to log, of any type
any number of values to attach to the log
Warning Log
Behaves like LogMethods.log, at level
'warn'. See LevelMethods.kind: 'log'; noErroris createdevent.lox.level