0.2.8 • Published 4 years ago

fastify-fluentd v0.2.8

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

fastify-fluentd

js-standard-style npm-version

Fastify plugin for fluentd. Under the hood the official fluent/fluent-logger-node module is used.

What is Fluentd?

Fluentd is an open source data collector for unified logging layer. Fluentd allows you to unify data collection and consumption for a better use and understanding of data.

Install

npm i fastify-fluentd --save

Usage

Add it to your project with register and you are done!

const fastify = require('fastify')()

fastify.register(require('fastify-fluentd'), {
  prefix: 'debug',
  config: {
    host: 'localhost',
    port: 24224,
    timeout: 3.0,
    reconnectInterval: 600000
  }
})

fastify.get('/user/:id', function (req, reply) {
  this.fluentd.emit('user', { request: req.params.id })
})

fastify.listen(3000, err => {
  if (err) throw err
})

License

Licensed under MIT.

0.2.8

4 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago