{"id":44454,"library":"bunyan-redis","title":"bunyan-redis","description":"A Bunyan stream transport for logging to Redis. Version 0.1.4 is the latest, though the package appears unmaintained (no recent updates). It allows sending log records to a Redis list or stream via the provided container key. Differentiates from other Bunyan transports by targeting Redis as a log backend. Suitable for centralized logging pipelines consuming from Redis.","status":"abandoned","version":"0.1.4","language":"javascript","source_language":"en","source_url":"git://github.com/harrisiirak/bunyan-redis","tags":["javascript","redis","bunyan","log"],"install":[{"cmd":"npm install bunyan-redis","lang":"bash","label":"npm"},{"cmd":"yarn add bunyan-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add bunyan-redis","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for creating Bunyan loggers and streams.","package":"bunyan","optional":false},{"reason":"Used to connect to Redis and publish log entries.","package":"redis","optional":false}],"imports":[{"note":"The package exports a named export. CJS require must access the property.","wrong":"const RedisTransport = require('bunyan-redis').RedisTransport","symbol":"RedisTransport","correct":"import { RedisTransport } from 'bunyan-redis'"},{"note":"Default export is the RedisTransport class. CJS require returns the module.exports object.","wrong":"const bunyanRedis = require('bunyan-redis')","symbol":"default","correct":"import bunyanRedis from 'bunyan-redis'"},{"note":"Destructuring is required for CJS to get the class, not the module exports object.","wrong":"const RedisTransport = require('bunyan-redis')","symbol":"RedisTransport","correct":"const { RedisTransport } = require('bunyan-redis')"}],"quickstart":{"code":"import bunyan from 'bunyan';\nimport { RedisTransport } from 'bunyan-redis';\n\nconst transport = new RedisTransport({\n  container: 'logs',\n  host: '127.0.0.1',\n  port: 6379,\n  db: 0\n});\n\nconst logger = bunyan.createLogger({\n  name: 'bunyan-redis',\n  streams: [{\n    type: 'raw',\n    level: 'trace',\n    stream: transport\n  }]\n});\n\nlogger.info({ foo: 'bar' }, 'test log');","lang":"javascript","description":"Creates a Bunyan logger that writes raw log entries to a Redis list keyed by 'logs'."},"warnings":[{"fix":"Set stream type to 'raw' in Bunyan stream configuration.","message":"Stream type must be 'raw' to preserve object structure, not 'json'.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Implement custom error handling on the Redis client before passing to transport.","message":"No reconnection or error handling for Redis connection loss.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Consider switching to a maintained alternative or update the underlying redis client manually.","message":"Package uses older redis driver API (e.g., no promise support).","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Ensure consumer reads from the correct Redis list using LRANGE or BLPOP.","message":"The 'container' option is the Redis key used for list push; logs are stored as serialized JSON strings.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.1.4':13 'allow':26 'appear':20 'backend':52 'bunyan':2,5,44,63 'bunyan-redi':1 'central':55 'consum':58 'contain':39 'differenti':41 'javascript':61 'key':40 'latest':16 'list':33 'log':9,28,51,56,64 'packag':19 'pipelin':57 'provid':38 'recent':23 'record':29 'redi':3,11,32,48,60,62 'send':27 'stream':6,35 'suitabl':53 'target':47 'though':17 'transport':7,45 'unmaintain':21 'updat':24 'version':12 'via':36","created_at":"2026-06-07T12:50:12.472219+00:00","updated_at":"2026-06-07T12:50:12.472219+00:00","problems":[{"fix":"Add 'type: \"raw\"' to the stream config and ensure transport is an instance of RedisTransport.","cause":"Stream type not set to 'raw' or transport not instantiated correctly.","error":"TypeError: transport is not a stream"},{"fix":"Start Redis server or provide correct host/port.","cause":"Redis server not running or unreachable.","error":"Error: Redis connection to 127.0.0.1:6379 failed"},{"fix":"Provide a non-empty 'container' option.","cause":"Container name missing or empty.","error":"ERR wrong number of arguments for 'rpush' command"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/harrisiirak/bunyan-redis","github":"git://github.com/harrisiirak/bunyan-redis","docs":null,"changelog":null,"pypi":null,"npm":"bunyan-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["logging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}