Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Latest commit

 

History

History
57 lines (44 loc) · 1.23 KB

README.md

File metadata and controls

57 lines (44 loc) · 1.23 KB

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').default;

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

Logstash

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

Run Tests

  npm test

License: MIT

See LICENSE for the full license text.