node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


node-es-logger v0.3.1

Forked from to add custom log function and allow dynamic type override

This module creates a bunyan logger instance with an output stream bound to elasticsearch instance with logstash compatible JSON format.


var logger = require('es-logger').create({
    name: 'myapp',
    host: 'localhost:9200'
logger.log(type, {object: value});

This prints a JSON and also send it to elasticsearch instance at localhost:9200.

Use with

var logger = require('es-logger').create({
    name: 'myapp',
    host: ''
});{value: 123}, 'message');

This prints a JSON and also send it to bonsai's elasticsearch instance at

see bunyan's README for what interfaces the logger has.