dkuida-winston-logstash
v0.4.1
Published
A Logstash transport for winston
Downloads
3
Readme
winston-logstash
A Logstash TCP transport for winston.
Based on the great work by @jaakkos https://github.com/jaakkos/winston-logstash
I decide to clone and deploy separately - since the code styles and nodejs version support that I have are very different from those of the original authors. But I will be more than happy if this fork will be merged back into the original project
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 { port => 28777 type=>"sample" }
}
output {
stdout { debug => true }
}
filter {
json {
source => "message"
}
}
Inspiration
Run Tests
NODE_TLS_REJECT_UNAUTHORIZED=0 npm test
TODO
- Rethink logstash integration ( https://github.com/flatiron/winston/blob/master/lib/winston/common.js#L149 )
- Rewrite
- Release major after rewrite
N. Clean up tests ( refactor )
Author: Jaakko Suutarla
License: MIT
See LICENSE for the full license text.