Skip to content

Releases: appscot/debug-logger

Console parity

13 Mar 16:50
Compare
Choose a tag to compare
  • debug-logger input syntax matches node's console for easier adoption:
    • Added log.time() and log.timeEnd();
    • Added log.dir();
    • Added log.assert().
  • 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/root debug instance.

A namespace per level

11 Mar 14:54
Compare
Choose a tag to compare
  • 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

26 Feb 17:34
Compare
Choose a tag to compare
  • 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

26 Feb 01:32
Compare
Choose a tag to compare

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 becomes log[level].logger() and log[level].enabled becomes log[level].enabled().
  • 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.