0.1.0 • Published 8 years ago

kermit-bunyan v0.1.0

Weekly downloads
1
License
BSD-2-Clause
Repository
gitlab
Last release
8 years ago

Kermit Module

kermit-bunyan - 0.1.0

The kermit-bunyan node module is a kermit wrapper of the bunyan logging framework.

Install

$ npm install --save kermit-bunyan

Usage & Configuration

Add the service to your application config file:

{
  app: {
    services: {
      logging: 'kermit-bunyan/LoggingService'
      ...
    }
  }

And configure the service appropriate. Check the bunyan docs for config options. NOTE: The kermit module supports the specification of an object of streams in addition to bunyan's default array streams definition. That allows overriding specific stream configurations on the different config layers supported by kermit.

  logging: {
    bunyan: {
      name: 'MY LOGGER', // (required)
      appName: 'MICROSERVICE NAME',
      streams: {
        screen: require('bunyan-format')({
          outputMode: 'long',
          color: false
        }),
        errorLog: {
          path: 'path/to/my/error.log',
          level: 'error'
        }
      }
    }
  }
}
0.1.0

8 years ago