0.1.3 • Published 11 years ago
winston-zeromq-elasticsearch v0.1.3
winston-zeromq-elasticsearch
A ZeroMQ-ElasticSearch transport for Winston. Sends the messages to save using a ZeroMQ PUSH socket. The message format is compatible with LogStash.
Usage
Install the npm dependency:
npm install wiston-zeromq-elasticsearch
Basic example:
var winston = require('winston');
require('winston-zeromq-elasticsearch').ZeroMQElasticSearch;
var logger = new winston.Logger ({
transports : [
new winston.transports.ZeroMQElasticSearch({
socketAddress : 'tcp://0.0.0.0:9700'
}),
new winston.transports.Console ({
json : false,
timestamp : true
})
]
});
logger.on('error', function (err) {
throw err;
});
setInterval(function () {
logger.info('Info message!');
}, 1000);
Environment
You can manage the saved logs using Kibana
Author: Angel Sanchez