Skip to content

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

Open
iainsproat wants to merge 1 commit intoredis:mainfrom
iainsproat:optional-external-logger
Open

feat(options): optionally allow custom logger to be provided#1851
iainsproat wants to merge 1 commit intoredis:mainfrom
iainsproat:optional-external-logger

Conversation

@iainsproat
Copy link

@iainsproat iainsproat commented Jan 23, 2024

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
Copy link

Why isn't this merged yet?

@Necrelox
Copy link

Exactly what was missing in ioredis, the ability to have a custom logger.

Please, I hope you can merge this quickly, it's been several months already 😅

It's exactly what I need right now.

@github-actions
Copy link

This pull request has been automatically marked as stale due to inactivity.
It will be closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the stale label Nov 27, 2025
@github-actions
Copy link

This pull request has been automatically closed due to inactivity.
If you would like to continue this work, please reopen the PR or create a new one.

@github-actions github-actions bot closed this Dec 27, 2025
@iainsproat
Copy link
Author

There was no reason for closing this afaik, the problem and PR is still relevant. A maintainer will have to re-open this as I don't have permissions.

@PavelPashov PavelPashov reopened this Jan 8, 2026
@github-actions github-actions bot removed the stale label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants