Releases: appscot/debug-logger
Releases · appscot/debug-logger
Console parity
debug-logger
input syntax matches node's console for easier adoption:- Added
log.time()
andlog.timeEnd()
; - Added
log.dir()
; - Added
log.assert()
.
- Added
- By default trace, debug, log and info output to stdout while warn and error output to stderr. This is configurable;
log()
now outputs through the default/rootdebug
instance.
A namespace per level
- Setting the color on
debug
instance itself to match a given level color; - All levels have their own
debug
instance by default with level name added to the namespace; - Removes INFO, WARN, ERROR, etc prefixes from log message (namespace already includes these);
- Added example on how to configure
debug-logger
the same way as in v0.3.1; .config()
method now supports customizing levels.
Ensure newline upon writing to stream
- Spying on stdout/stderr to figure out if last output ended on '\n' or not;
- Performance: don't process arguments unless debug instance is enabled;
- Show object inspection inline if not too lengthy;
- Highlighting improvements.
v0.3.0
v0.3.0
- Lazy loading debug instances: only when they are used for the first time they are actually instantiated;
- Note: this breaks the interface.
log[level].logger
becomeslog[level].logger()
andlog[level].enabled
becomeslog[level].enabled()
.
- Note: this breaks the interface.
- Added support for multi arguments (like console.log). Multiple arguments are concatenated using space as separator;
- Added support printf()-like formatting elements (like console.log);
- Added support for a new DEBUG_LEVEL env variable where it's possible to restrict the level of output shown. Examples: DEBUG_LEVEL =
warn
|*:info
|myapp:2,otherapp:debug
- Some highlight changes, most importantly stack trace will be printed in the same color as the level (e.g. red for error);
- Added trace level.