Loxer.log('Hello World');
console.log()
, but:Loxer.init(options)
console.log(message, item)
,
but only in development mode.highlight().log(...)
or .h().log(...)
to highlight the log.level().log(...)
or .l().log(...)
to set a level to the log - otherwise it's 1
(high).module().log(...)
or .m().log(...)
to assign a module to the log - otherwise it's NONE
Loxer.h().l(2).m('Account').log(...)
to log
to append
to configure the (default) output of the item
Loxer.error(new Error('Goodbye World!'));
console.error()
, but:Loxer.init(options)
console.log(error)
,
but only in development modeError
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 output.level().error(...)
or .l().error(...)
will
not take any effect on the error log (except that level
will be a property of the output)an Error
or string
| number
| boolean
| object
(converted to an Error)
to append
to configure the (default) output of the item
const loxId = Loxer.open('Open World!')
typeof number
) that can be used with Loxer.of(id)
to assign other logs to itLoxer.init(options)
console.log(message, item)
,
but only in development mode.highlight().open(...)
or .h().open(...)
to highlight the log.level().open(...)
or .l().open(...)
to set a level to the log - otherwise it's 1
(high).module().open(...)
or .m().open(...)
to assign a module to the log - otherwise it's NONE
Loxer.h().l(2).m('Account').open(...)
to log
to append
to configure the (default) output of the item
// this has to be done before:
const id = Loxer.open('opening message');
// assign a log:
Loxer.of(id).add('next step is reached');
// assign an error:
Loxer.of(id).error('something went wrong');
// close the log box:
Loxer.of(id).close('closing message');
id
's opened log..highlight().log(...)
or .h().log(...)
to highlight the log
TODO level changes.level().of(...)
or .l().of(...)
to set a level to the logs - otherwise it's 1
(high).module().of(...)
or .m().of(...)
to assign modules will take no effect though assigned
modules will always adapt the module of the opening logLoxer.h().l(2).m('Account').log(...)
add: (message: string, item?: any)
- assigns a single log to the boxerror: (error?: Error | string)
- assigns an error log to the boxclose: (message: string, item?: any)
- assigns a log to the box, that also closes the box (and its box layout)add()
, error()
or close()
after closing the box, the log will not be appended to the box but
logged anyways with a Warningthe id returned from Loxer.open()
to reference this log to
Generated using TypeDoc
Simple Log