subjclog2607-pmb
v0.1.0
Published
Make your console.log()ging a bit more traceable with a subject prefix.
Downloads
168
Readme
subjclog2607-pmb
Make your console.log()ging a bit more traceable with a subject prefix.
This module logs to the default console,
thus the "c" in its name. If you want to log to memory instead, use the the similarly-named module subjlog1707-pmb.
API
This module exports one function:
makeLogger(subj)
Returns a function log that console.log()s
the subj and all its arguments.
The subj should be a string, because future versions may support
overloaded invocations with a different type of first argument.
.dbg, .err, .warn
The log function from makeLogger also carries some methods:
.dbg: Same but forconsole.debug()..err: Same but forconsole.error()..warn: Same but forconsole.warn().
Usage
see test/usage.mjs.
Known issues
- Needs more/better tests and docs.
License
ISC
