Socket
Socket
Sign inDemoInstall

winston-syslogudp

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    winston-syslogudp

A UDP only syslog transport for winston


Version published
Weekly downloads
10
increased by66.67%
Maintainers
1
Install size
61.6 kB
Created
Weekly downloads
 

Readme

Source

winston-syslogUdp

A UDP Only Syslog transport for [winston].

Installation

  $ npm install winston 
  $ npm install winston-syslogudp

Motivation

This module is based on winston-syslog and syslogUdp and intended to provide a lightweight UDP only winston syslog transport. It was created when the authors experienced challenges with winston-syslog and with winston-loggly.

Usage

To use the Syslog transport in [winston], you simply need to require it and then either add it to an existing [winston] logger or pass an instance to a new [winston] logger:

  var winston = require('winston');
  require('winston-syslog').Syslog;  
  winston.add(winston.transports.Syslog, options);

Options:

  • host: The host running syslogd, defaults to localhost.
  • port: The port on the host that syslog is running on, defaults to syslogd's default port.
  • pid: PID of the process that log messages are coming from (Default process.pid).
  • facility: Syslog facility to use (Default: local0).
  • localhost: Host to indicate that log messages are coming from (Default: localhost).
  • type: The type of the syslog protocol to use (Default: BSD).

Metadata: Logged as string compiled by [glossy].

Log Levels

Because syslog only allows a subset of the levels available in [winston], levels that do not match will be ignored. Therefore, in order to use winston-syslogudp effectively, you should indicate to [winston] that you want to use the syslog levels:

  var winston = require('winston');
  winston.setLevels(winston.config.syslog);

The Syslog transport will only log to the level that are available in the syslog protocol. These are (in increasing order of severity):

  • debug
  • info
  • notice
  • warning
  • error
  • crit
  • alert
  • emerg

Keywords

FAQs

Last updated on 25 Sep 2013

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc