From 370fa7119039ff5af556a408951ad75f03392396 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:38:27 +0600 Subject: [PATCH] Reduce the log level of validateObject to WARN - Reduce the log level of `JedisFactory#validateObject` to `WARN` - Reduce the log level of `ConnectionFactory#validateObject` to `WARN` --- src/main/java/redis/clients/jedis/ConnectionFactory.java | 2 +- src/main/java/redis/clients/jedis/JedisFactory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/redis/clients/jedis/ConnectionFactory.java b/src/main/java/redis/clients/jedis/ConnectionFactory.java index d286462347..3500a21172 100644 --- a/src/main/java/redis/clients/jedis/ConnectionFactory.java +++ b/src/main/java/redis/clients/jedis/ConnectionFactory.java @@ -76,7 +76,7 @@ public boolean validateObject(PooledObject pooledConnection) { // check HostAndPort ?? return jedis.isConnected() && jedis.ping(); } catch (final Exception e) { - logger.error("Error while validating pooled Connection object.", e); + logger.warn("Error while validating pooled Connection object.", e); return false; } } diff --git a/src/main/java/redis/clients/jedis/JedisFactory.java b/src/main/java/redis/clients/jedis/JedisFactory.java index b84e2b05ae..0e07ccc286 100644 --- a/src/main/java/redis/clients/jedis/JedisFactory.java +++ b/src/main/java/redis/clients/jedis/JedisFactory.java @@ -197,7 +197,7 @@ public boolean validateObject(PooledObject pooledJedis) { && jedis.getConnection().isConnected() && jedis.ping().equals("PONG"); } catch (final Exception e) { - logger.error("Error while validating pooled Jedis object.", e); + logger.warn("Error while validating pooled Jedis object.", e); return false; } }