seneca-pino-logger
v1.0.2
Published
Pino logger plugin for Seneca
Downloads
23
Readme
A Seneca.js logger for Pino
seneca-pino-logger
- Lead Maintainer: David Gonzalez
- Sponsor: nearForm
- node: 4.x, 6.x
This module is a plugin that enables your Seneca-based microservice use Pino as a logger.
Seneca compatibility
Supports Seneca versions 3.x
Getting Started
This logger can be used in two ways:
- Passing an instance of Pino
- Passing the configuration to create an instance
Here is an example on how to use the logger passing an existing instance:
var Seneca = require('seneca')
var Pino = require('pino')
var pino = Pino()
var config = {legacy: {logging: false}, 'pino-logger': {instance: pino}}
var seneca = Seneca(config)
seneca.use('./pino')
And here is one example on how to use the logger passing the configuration:
var Seneca = require('seneca')
var Pino = require('pino')
var pino = Pino()
var config = {legacy: {logging: false}, 'pino-logger': {config: {extreme: true}}}
var seneca = Seneca(config)
seneca.use('./pino')
And that's all!
Configuration
In order to configure the logger there is a number of configuration parameters that can be passed into Seneca in the key 'pino-logger'.
Those parameters are defined by Pino.
Compatibility
seneca-pino-logger is only compatible with Seneca 3.0+ and Node 4.x+
Contributing
The Senecajs org encourage open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.
License
Copyright (c) 2016, David Gonzalez and other contributors. Licensed under MIT.