better-log
console.log wrapper for a bit more readable output in Node.js
Tired of seeing hardly readable outputs like this?
Replace them with something more elegant!
Usage
Patching built-in console
(API is 100% compatible)
require('better-log/install');
console.log({ x: 1, y: 'prop' });
console.error('Something bad happened :(');
or
require('better-log').install({ depth: 2 });
console.log({ x: 1, y: 'prop' });
console.error('Something bad happened :(');
Restoring native console.log
:
require('better-log').uninstall();
Manual usage as a regular function
var log = require('better-log');
log({ x: 1, y: 'prop' });
log.error('Something bad happened :(');
That's it!