1.0.2 • Published 1 year ago

@sincrolab/bunyan-gelf-rest v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

🔥 Bunyan Gelf Rest

Bunyan stream to send logs in GELF format to Greylog by using REST API

Installation

With yarn:

yarn add @sincrolab/bunyan-gelf-rest

With npm:

npm install @sincrolab/bunyan-gelf-rest

Example

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

const bunyan = require('bunyan')
const { BunyanGelfRest } = require('@sincrolab/bunyan-gelf-rest')

const streams = [
	{
		type: 'raw',
		stream: new BunyanGelfRest({
			host: 'https://log-service.com',
			port: 9999, // optional (default 443)
			path: '/gelf' // optional (default '/')
		})
	}
]

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

module.exports = Logger
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago