🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

bunyan-child

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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

Keywords

logging

FAQs

Package last updated on 17 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts