json-logger

1.0.1 • Public • Published

json-logger

Super simple logger (similar to debug) prints newline delimited json to stdout.

Usage

var log = require('json-logger')({
  user: 'foobar'
});
 
log('critical error', { message: 'You failed.' });
// will log
// { type; 'critical error', message: 'you failed', user: 'foobar' }

See the examples folder for usage the output is tested there as well...

Readme

Keywords

none

Package Sidebar

Install

npm i json-logger

Weekly Downloads

3

Version

1.0.1

License

Apache2

Last publish

Collaborators

  • lights-of-apollo