bunyan-console-log

0.2.0 • Public • Published

bunyan-console-log

Minimal Bunyan stream like console.log that pretty prints output

var bunyan = require('bunyan');
var stream = require('bunyan-console-log')({
  printJSON: false,
  compact: false,
  colors: true
});

var options = {
  name: "example",
  streams: [{
    level: 'info',
    stream: stream
  }]
};
var logger = bunyan.createLogger(options);

logger.info({
  meta: {
    when: "now"
  },
  data: {
    hello: "world"
  }
}, "Example label");

Example output:

Example label { data: { hello: 'world' } }

Installation

$ npm install bunyan-console-log

Package Sidebar

Install

npm i bunyan-console-log

Weekly Downloads

92

Version

0.2.0

License

MIT

Unpacked Size

3.86 kB

Total Files

5

Last publish

Collaborators

  • tilleps