@medinamarquezp/bunyangelf
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Package forked from bunyan-gelf

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

Installation

With yarn:

yarn add @medinamarquezp/bunyangelf

With npm:

npm install @medinamarquezp/bunyangelf

Example

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

const bunyan = require("bunyan");
const BunyanToGelfStream = require("@medinamarquezp/bunyangelf");

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;

Package Sidebar

Install

npm i @medinamarquezp/bunyangelf

Weekly Downloads

0

Version

1.1.2

License

MIT

Unpacked Size

6.53 kB

Total Files

7

Last publish

Collaborators

  • medinamarquezp