1.1.1 • Published 3 years ago

bunyan-gelf v1.1.1

Weekly downloads
22
License
MIT
Repository
github
Last release
3 years ago

bunyan-gelf

npm npm

Bunyan stream to send logs in GELF format to GELF related log collecting services).

Installation

With yarn:

yarn add bunyan-gelf

With npm:

npm install bunyan-gelf

Example

For more information about bunyan streams read the official bunyan documentation.

const bunyan = require('bunyan');
const BunyanToGelfStream = require('bunyan-gelf');

const streams = [{
 type: 'raw',
 stream: new BunyanToGelfStream({
   host: 'log-service.example', // GELF related service url (without any protocol)
   port: 9999,
   protocol: 'tcp', // Supported: 'tcp' and 'udp' (default: 'udp')
 }),
}];

const Logger = bunyan.createLogger({
  name: 'myapp',
  streams,
  serializers: bunyan.stdSerializers,
});

module.exports = Logger;
1.1.1

3 years ago

1.1.0

4 years ago

1.0.0

5 years ago