A fixed-length Redis transport for winston using Redis Streams (Redis 5.0+). Current version 0.0.3, last updated on npm. This is a fork of the original winston-redis, rewritten to use ioredis and Redis Streams for capped log storage. Unlike the original, it does not support Redis Pub/Sub for logging. The query method filters by time range and supports field selection. Requires Node >=8.11, winston ^3.0.0, and Redis server >=5.0.0. Lightweight, no external dependencies beyond winston and ioredis.
npm install winston-redis-streamNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a winston logger with the Redis transport, log a message, and query recent logs from Redis.
Upgrade Redis server to version 5.0.0 or later.
Adjust any custom Redis client configuration to be compatible with ioredis options.
Use the original winston-redis if Pub/Sub logging is required.
Access results.redis (array of logs) when using logger.query()
Add flatMeta: true to transport options if you want meta fields at top level.
Start Redis server, or specify correct host/port in transport options.
Use const RedisTransport = require('winston-redis-stream'); without .default.Upgrade Redis server to version 5.0 or higher.