Skip to content

Instantly share code, notes, and snippets.

@elhoyos
Last active July 9, 2016 22:13
Show Gist options
  • Save elhoyos/4ff213e1469f8ca38c5f to your computer and use it in GitHub Desktop.
Save elhoyos/4ff213e1469f8ca38c5f to your computer and use it in GitHub Desktop.
Bunyan logging
var bunyan = require('bunyan');
var logger = bunyan.createLogger({
name: 'myapp',
serializers: bunyan.stdSerializers
});
// When using standard serializers, an Error object can be passed in "err"
logger.fatal({err: new Error('Something wrong'), payload: payload}, 'Ooops');
// The simplest
logger.fatal(new Error('Something wrong'), 'Ooops');
@elhoyos
Copy link
Author

elhoyos commented Aug 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment