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

winston-logstash-udp

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-logstash-udp

A Logstash UDP transport for winston

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
344
increased by1.47%
Maintainers
1
Weekly downloads
 
Created
Source

winston-logstash-udp Build Status

A Logstash UDP transport for winston.

Based on a gist by mbrevoort and inspired by winston-logstash.

Usage

Node

Recommended method:

    var winston = require('winston'),
        LogstashUDP = require('winston-logstash-udp').LogstashUDP;

    var logger = new(winston.Logger)({
      transports: [
        new(LogstashUDP)({
          port: 9999,
          appName: 'my application name',
          host: '127.0.0.1'
        })
      ]
    });

Alternate method:

    var winston = require('winston');

    //
    // Requiring `winston-logstash-udp` will expose
    // `winston.transports.LogstashUDP`
    //
    require('winston-logstash-udp');

    winston.add(winston.transports.LogstashUDP, {
      port: 9999,
      appName: 'my application name',
      host: '127.0.0.1'
    });

Logstash

    input {
      # Sample input over UDP
      udp { format => "json" port => 9999 type => "sample" }
    }
    output {
      stdout { debug => true debug_format => "json"}
    }

Run Tests

  npm test

Troubleshooting

  • I get an error when installing node packages "ERR! Error: No compatible version found: assertion-error@'^1.0.1'"

    If you are running a version of NodeJS less than or equal to 0.8, upgrading NPM to a version greater than or equal to 1.4.6 should solve this issue.

    npm install -g npm@~1.4.6
    

    Another way around is to simply avoid installing the development dependencies:

    npm install --production
    

====================

Author: Craig Thayer
License: MIT

See LICENSE for the full license text.

Keywords

FAQs

Package last updated on 18 Jan 2017

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