seneca-pino-logger

1.0.2 • Public • Published

Seneca

A Seneca.js logger for Pino

seneca-pino-logger

npm version Build Status Dependency Status Coveralls Gitter

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.

Readme

Keywords

none

Package Sidebar

Install

npm i seneca-pino-logger

Weekly Downloads

6

Version

1.0.2

License

MIT

Unpacked Size

5.3 kB

Total Files

5

Last publish

Collaborators

  • mcdonnelldean
  • mihaidma
  • rjrodger