@sincrolab/bunyan-gelf-rest
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

🔥 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

Readme

Keywords

none

Package Sidebar

Install

npm i @sincrolab/bunyan-gelf-rest

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

18.8 kB

Total Files

21

Last publish

Collaborators

  • sincrolab