aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2021-12-16 09:32:07 +0100
committerHarald Musum <musum@yahooinc.com>2021-12-16 09:32:07 +0100
commit0fb73efcea0a603afa727280cb0031a4653e866a (patch)
tree460b25b3a5671c7c09aa8167b4a470231fb634de /config
parent578a3379cc6f37cd5790b07d50ed7f0991dd6969 (diff)
Less logging when config requests fail
A warning will be logged every minute independently of this
Diffstat (limited to 'config')
-rw-r--r--config/src/main/java/com/yahoo/config/subscription/impl/JRTConfigRequester.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/config/src/main/java/com/yahoo/config/subscription/impl/JRTConfigRequester.java b/config/src/main/java/com/yahoo/config/subscription/impl/JRTConfigRequester.java
index fdfaf8b72fd..5f3445d1d8f 100644
--- a/config/src/main/java/com/yahoo/config/subscription/impl/JRTConfigRequester.java
+++ b/config/src/main/java/com/yahoo/config/subscription/impl/JRTConfigRequester.java
@@ -19,12 +19,10 @@ import java.time.Duration;
import java.time.Instant;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
import java.util.logging.Logger;
import static java.util.logging.Level.FINE;
import static java.util.logging.Level.FINEST;
-import static java.util.logging.Level.INFO;
import static java.util.logging.Level.SEVERE;
import static java.util.logging.Level.WARNING;
@@ -170,15 +168,11 @@ public class JRTConfigRequester implements RequestWaiter {
private void handleFailedRequest(JRTClientConfigRequest jrtReq, JRTConfigSubscription<ConfigInstance> sub, Connection connection) {
logError(jrtReq, connection);
- log.log(INFO, "Failure of config subscription to " + connection.getAddress() +
- ", clients will keep existing config until resolved: " + sub);
connectionPool.switchConnection(connection);
if (failures < 10)
failures++;
long delay = calculateFailedRequestDelay(failures, timingValues);
- // The logging depends on whether we are configured or not.
- Level logLevel = sub.getConfigState().getConfig() == null ? Level.FINE : Level.INFO;
- log.log(logLevel, () -> "Request for config " + jrtReq.getShortDescription() + "' failed with error code " +
+ log.log(FINE, () -> "Request for config " + jrtReq.getShortDescription() + "' failed with error code " +
jrtReq.errorCode() + " (" + jrtReq.errorMessage() + "), scheduling new request " +
" in " + delay + " ms");
scheduleNextRequest(jrtReq, sub, delay, calculateErrorTimeout());