0.1.3 • Published 11 years ago

winston-zeromq-elasticsearch v0.1.3

Weekly downloads
6
License
-
Repository
github
Last release
11 years ago

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

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago