bunyan-redis-stream
A lightweight Redis stream for Bunyan that can publish to a channel or push to a list.
Installation
npm install bunyan-redis-stream
Usage
node_redis
var bunyan = redis = RedisStream = client = redis; var stream = client : client key : 'logs' type : 'channel'; var logger = bunyan;
ioredis
var bunyan = Redis = RedisStream = client = ; var stream = client : client key : 'logs' type : 'channel'; var logger = bunyan;
Params
Name | Type | Description |
---|---|---|
client | object | Redis client instance |
[key=logs] | string | Name of Redis list or channel to use |
[type=channel] | string | Method used in which to store log messages in Redis. Either list or channel . |
Running Tests
General
npm test
Integration
Integration tests assume that a Redis server is running locally on port 6379 with no auth.
npm run integration