Minimal Bunyan stream like console.log that pretty prints output
npm install bunyan-console-log
``js
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:
`bash`
Example label { data: { hello: 'world' } }
`bash``
$ npm install bunyan-console-log