Skip to content

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

License

Notifications You must be signed in to change notification settings

joaquimserafim/bunyan-child

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bunyan-child

creates 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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published