kermit-bunyan

0.1.0 • Public • Published

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

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i kermit-bunyan

    Weekly Downloads

    2

    Version

    0.1.0

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • a-z