winston-logstash

A Logstash transport for winston

npm install winston-logstash
168 downloads in the last day
593 downloads in the last week
3 040 downloads in the last month

winston-logstash

Build Status

A Logstash TCP transport for winston.

Usage

Node

  var winston = require('winston');

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

  winston.add(winston.transports.Logstash, {
    port: 28777,
    node_name: 'my node name',
    host: '127.0.0.1'
  });

Logstash config

  input {
    # Sample input over TCP
    tcp { format => "json" charset => "UTF-8" port => 28777 type=>"sample" }
  }
  output {
    stdout { debug => true debug_format => "json"}
  }

Inspiration

winston-loggly

Run Tests

  NODE_TLS_REJECT_UNAUTHORIZED=0 npm test

TODO

  1. Support for different formats
  2. Clean up tests ( refactor )

Author: Jaakko Suutarla

License: MIT

See LICENSE for the full license text.

npm loves you