winston-logstash-udp
A Logstash UDP transport for winston.
Based on a gist by mbrevoort and inspired by winston-logstash.
Usage
Node
Recommended method:
var winston =LogstashUDP = LogstashUDP;var logger = newwinstonLoggertransports:newLogstashUDPport: 9999appName: 'my application name'host: '127.0.0.1';
Alternate method:
var winston = ;//// Requiring `winston-logstash-udp` will expose// `winston.transports.LogstashUDP`//;winston;
Logstash
input {# Sample input over UDPudp {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
====================
Craig Thayer
Author:License: MIT
See LICENSE for the full license text.