New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@reallyuseful/logger-transport-gelf

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reallyuseful/logger-transport-gelf

A logging transport for GELF and Graylog

  • 1.0.0-alpha.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

@reallyuseful/logger-transport-gelf

Logging transport for GELF/Graylog

This is a logging transport for @reallyuseful/logger.

It logs to a GELF server (the protocol used by Graylog).

const { Logger, ConsoleTransport } = require('@reallyuseful/logger');
const { GelfTransport } = require('@reallyuseful/logger-transport-gelf');

// log to Graylog and to the console
const gelfTransport = new GelfTransport({ appName: 'myApp' });
const consoleTransport = new ConsoleTransport();

const myLogger = new Logger([gelfTransport, consoleTransport]);

Options for GelfTransport

GelfTransport can be customized with the following options:

Options for connecting to the GELF/Gryalog server
  • host (string): the GELF or Graylog host (default: localhost)
  • port (number): TCP or UDP port number (default: 12201)
  • protocol (udp, tcp, or tcp-tls): whether to use UDP, TCP, or TCP with TLS encryption (default: udp)
  • ipVersion (4 or 6): must be set if your GELF host is on IPv6 (default: 4)
  • tcpTimeout (number): if using a tcp protocol, the timeout in milliseconds (default: 4000 milliseconds)
  • caCert (string): if using tcp-tls and a self-signed certificate, the certificate of the CA that issued it, in PEM format
Options that identify your app
  • source (string): your app’s hostname (default: os.hostname())
  • appName (string): your app’s name, passed as the appName value to GELF
  • appVersion (string): your app’s version number, passed as the appVersion value to GELF
  • env (string): the environment (such as "development" or "production") in which your app is running (default: the value of the NODE_ENV environment variable)
Options for modifying messages to be logged
  • transform (function): an optional function that can modify messages just before they are sent to GELF. Receives (message, meta) as input and must return an object { message, meta } with the modified values.
Other options
  • minimumSeverity (Level): if specified, messages lower than this severity will not be logged to this transport

Keywords

FAQs

Package last updated on 28 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc