redis / jedis

Redis Java client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce the log level of validateObject to WARN

sazzad16 opened this issue · comments

There have been confusions, misunderstandings, half-understandings regarding ERROR logs in JedisFactory#validateObject and ConnectionFactor#validateObject.

Here is a list of relevant concerns:

I think, reducing the log level to WARN would resolve or at least reduce these concerns to some extent.

I think general business will configure the level of info. There seems to be no difference between error or warn (both will be printed). Maybe we should consider debug?

I think general business will configure the level of info. There seems to be no difference between error or warn (both will be printed). Maybe we should consider debug?

Both would be printed, but having them at specific levels means setting up alerts based on the level (eg Datadog, Pagerduty, etc) is possible. For example, we only trigger alerts for on-call when the level is ERROR, meaning something catastrophic, possibly unrecoverable, has happened. Since most people don't log production applications at the DEBUG level, those logs would be unseen.

The thing is we wanted those to be seen so that users can take actions. Sometimes its just network, sometimes tweaking Jedis/Redis configs were enough to improve the health/performance of the application.

IMO, we now go to WARN. Depending on the feedback/reaction, we'll consider DEBUG.

Is there any reason this was leapfrogged and not included in release https://github.com/redis/jedis/releases/tag/v5.1.2?

@kdrakon This has breaking implication. Some applications may be dependant on the logs, but they will miss out if their log level is set to ERROR. So this change is not part of a patch release and will be part of 5.2.0. If you really want, this change is available in 5.2.0-SNAPSHOT.