kmtong / logback-redis-appender

Logback Redis Appender
Apache License 2.0
114 stars 64 forks source link

Change GenericObjectPoolConfig to JedisPoolConfig #31

Closed TPXL closed 2 years ago

TPXL commented 3 years ago

Change GenericObjectPoolConfig to JedisPoolConfig, add timeBetweenEvictionRuns and minEvictableIdleTime properties.

Reasoning is getting a Jedis instance from the pool will throw if the underlying connection is dead. Testing on idle will ping the server, keeping the connection alive. This can be turned off by setting timeBetweenEvictionRuns to a non-positive number.