Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jirwin/node-logmagic-logstash
A logstash sink for logmagic.
https://github.com/jirwin/node-logmagic-logstash
Last synced: 21 days ago
JSON representation
A logstash sink for logmagic.
- Host: GitHub
- URL: https://github.com/jirwin/node-logmagic-logstash
- Owner: jirwin
- License: apache-2.0
- Created: 2014-01-03T10:55:49.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-07T07:35:37.000Z (almost 11 years ago)
- Last Synced: 2024-11-20T16:18:56.603Z (about 1 month ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-logmagic-logstash
A sink for logmagic that outputs to logstash via udp.## install
`$ npm install logmagic-logstash`## example js
```javascript
var logmagic = require('logmagic');
var log = logmagic.local('test.logstash');
var logstashSink = require('logmagic-logstash').LogstashSink;// Create a new logstash sink
var logstash = new logstashSink('test', '192.168.1.111', 9999);// Tell logmagic to route logs to the new logstash sink
logmagic.registerSink('logstash', logstash.log.bind(logstash));
logmagic.route('__root__', logmagic.INFO, 'logstash');log.error('Just a random log error', {'foo': 'bar', 'baz': 40});
log.info('Just a random log info', {'foo': 'bar', 'baz': 42});
log.debug('Just a random log debug', {'foo': 'bar', 'baz': 12});```
## logstash config
```
input {
udp {
codec => "json"
type => "nodejs"
port => 9999
}
}
output {
stdout {
codec => rubydebug
}
}
```## test
`$ npm test`