better-log
console.log wrapper for a bit more readable output
Last updated 11 years ago by rreverser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install better-log 
SYNC missed versions from official npm registry.

better-log

console.log wrapper for a bit more readable output in Node.js

Tired of seeing hardly readable outputs like this?

regular console.log

Replace them with something more elegant!

better log

Usage

Patching built-in console (API is 100% compatible)

require('better-log/install'); // ES6: import 'better-log/install';
console.log({ x: 1, y: 'prop' });
console.error('Something bad happened :(');

or

require('better-log').install({ depth: 2 }); // optional config
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')/* .setConfig({ depth: 2 }) */;
log({ x: 1, y: 'prop' });
log.error('Something bad happened :(');

That's it!

Current Tags

  • 1.3.3                                ...           latest (11 years ago)

8 Versions

  • 1.3.3                                ...           11 years ago
  • 1.3.2                                ...           11 years ago
  • 1.3.1                                ...           11 years ago
  • 1.3.0                                ...           11 years ago
  • 1.2.0                                ...           11 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
  • 0.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 8
Last Day 2
Last Week 5
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |