1.0.0 • Published 9 years ago

bunyan-child v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

bunyan-child

create a primary instance of a bunyan logger and many child instances from the primary and with support to send the logs to logstash

Build StatusCode Coverage 100%ISC License

API

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

Usage

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')

Development

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