redis / ioredis

🚀 A robust, performance-focused, and full-featured Redis client for Node.js.
MIT License
14.06k stars 1.19k forks source link

feat(options): optionally allow custom logger to be provided #1851

Open iainsproat opened 5 months ago

iainsproat commented 5 months ago

In many environments logging to console is not recommended, and instead a different logging mechanism is used. This may be to provide metadata, or to ensure the logged message conforms to a particular format (e.g. json), etc..

This Pull Request allows a different logging mechanism to optionally be provided. The logging mechanism must conform to the existing interface expected of console; e.g. it must provide an error, warn, and log method.

Defaults to console, which is the existing behaviour.

rajithavk commented 2 months ago

Why isn't this merged yet?