What's changed in this fork
- reduced ops by reusing results from
- optimized trimming by applied drop factor
- only accept well-initialized redis-client
npm install @aftership/bunyan-redis
With existing redis client connection.
var ioredis = ;var client =port: 6379 // Redis porthost: '127.0.0.1' // Redis hostdb:15;var RedisTransport = ;var bunyan = ;transport =container: 'logs:foo'client: clientdrop_factor: 025length:10diagnosis: true;logger = bunyan;
And with connection data.
- client - redis client instance
- container - redis key
- length: maximum size of log queue
- drop_factor (optional): by which overflown logs are dropped, default = 0