pino-redis-streams
v1.0.3
Published
A pino transport which outputs to a Redis Stream
Downloads
218
Maintainers
Readme
pino-redis-streams
This packages provides "transport" for pino which forwards logs to Redis Streams.
Installation
npm install pino-redis-streams
Usage
You can use this transport as follows:
import pino from 'pino';
const transport = pino.transport({
target: 'pino-redis-streams',
options: {
streams: 'my-log-stream',
clientOptions: {
socket: {
port: 6380,
host: 'my.redis.server.com',
tls: true,
},
password: 'supersecurepassword',
},
},
});
pino(transport);
Options
stream
(string | string[]) a string or an array of strings of stream keys to which you want to send the logs.clientOptions
(_RedisClientOptions) the Redis client options found in the official docs of Redis.