kermit-bunyan
v0.1.0
Published
Kermit wrapper for bunyan logger.
Downloads
10
Readme
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'
}
}
}
}
}