Right now, the logger is global to the module.
This could help to solve things like this:
- we may want a VoidLogger for one client, or for the sentinel client but not the others
- provide better context error with each client, for example when code handles connections to multiple Redis instances
- it can be challenging when dealing with unit tests.
Here this issue is here to get feedback about the idea.
I feel like a client option for the logger of the NewClient, NewSentinel and NewDialer seems an easy way to provide this
https://pkg.go.dev/github.com/redis/go-redis/v9#Options
Then we would fall back on the global logger.
I can implement this if you are fine with the idea.