Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.23 KB

README.md

File metadata and controls

42 lines (30 loc) · 1.23 KB

eel-redis - Redis backend for eel

Build Status

Synopsis

var log = require('eel')
require('eel-redis')

// Default parameters (except password)
var handler = log.backends.configure('redis://password@localhost:6379/?list=logstash')

// All URI parts are optional, so you could also say:
var handler = log.backends.configure('redis://')

// Redis client is available as `handler.client`.
// You may wish to attach an error handler to it (keep in mind that the redis
// client already automatically reconnects)
handler.client.on('error', function (err) {
	var msg = 'Redis client emitted error: ' + err
	var fields = {
		uri: uri.href,
		err: err,
		stack: err.stack.split('\n').map(function (l) { return l.trim() }),
	}
	log.backends.unload(handler)  // Avoid infinite callback recursion
	log.error(msg, fields)
})

Description

This is a Redis backend for eel (EventEmitter logging).

Installation

npm install --save eel eel-redis

Installing eel as a direct dependency is necessary for require('eel') to work in your app.