A capped Redis transport for winston.
const winston = require('winston');
const redisTransport = require('winston-redis');
const logger = winston.createLogger({
level: 'info',
transports: [
new redisTransport()
]
});
logger.log({
level: "info",
message: "redis is awesome",
reason: "it's fast" // this will get stored as meta data
});
This transport accepts the options accepted by the node-redis client:
In addition to these, the Redis transport also accepts the following options.
meta
object.Metadata: Logged as JSON literal in Redis
$ curl http://npmjs.org/install.sh | sh
$ npm install winston
$ npm install winston-redis
Winston-redis tests are written in mocha, using Abstract Winston Transport and designed to be run with npm.
npm test