@viewsonic-mvb/pino-fluentd
v1.0.4
Published
Load pino logs into Fluentd
Downloads
263
Readme
pino-fluentd
Install
npm install @viewsonic-mvb/pino-fluentd
Usage as module
const pino = require('pino')
const pinoFluentd = require('@viewsonic-mvb/pino-fluentd')
const streamToFluentd = pinoFluentd({
index: 'an-index-%{DATE}',
host: 'localhost',
port: 24224,
client: {
milliseconds: true,
eventRetry: {},
flushInterval: 1000,
},
})
const logger = pino({ level: 'info' }, streamToFluentd)
logger.info('hello world')
// ...
License
Licensed under MIT.