creates a primary instance of a bunyan logger and many child
instances from the primary and with support to send the logs to logstash
var logger = require('bunyan-child')
- options {}, configure bunyan options, non required
- logstash URI string, address and port for logstash and enables the use of logstash, non required
var log = logger({name: 'MYLOG'}, 'logstash://127.0.0.1:9000')
log.info('hello world')
// in a sub-component of your application
var subLog = log.child({type: 'some_op'})
subLog.info('hello world from the sub-component')
this projet has been set up with a precommit that forces you to follow a code style, no jshint issues and 100% of code coverage before commit
to run test
npm test
to run jshint
npm run jshint
to run code style
npm run code-style
to run check code coverage
npm run check-coverage
to open the code coverage report
npm run open-coverage