From ee9e892838733da49d5ea2b74e456751c05c3f18 Mon Sep 17 00:00:00 2001 From: gjoranv Date: Fri, 24 Apr 2020 15:43:42 +0200 Subject: LogLevel.WARNING -> Level.WARNING --- .../main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java | 4 ++-- .../java/com/yahoo/vespa/config/proxy/DelayedResponseHandler.java | 4 ++-- .../src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java | 2 +- .../main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java | 2 +- .../java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java | 2 +- .../vespa/config/proxy/filedistribution/CachedFilesMaintainer.java | 2 +- .../com/yahoo/vespa/config/proxy/filedistribution/RequestTracker.java | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'config-proxy') diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java index 1399c3677af..a19d5809660 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java @@ -253,7 +253,7 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer log.log(Level.FINEST, () -> String.format("Executing RPC request %s.", requestLogId(request))); handler.run(); } catch (Exception e) { - log.log(LogLevel.WARNING, + log.log(Level.WARNING, String.format("Exception thrown during execution of RPC request %s: %s", requestLogId(request), e.getMessage()), e); } }); @@ -273,7 +273,7 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer log.log(Level.FINE, () ->"getConfig: " + request.getShortDescription() + ",configmd5=" + request.getRequestConfigMd5()); if (!request.validateParameters()) { // Error code is set in verifyParameters if parameters are not OK. - log.log(LogLevel.WARNING, "Parameters for request " + request + " did not validate: " + request.errorCode() + " : " + request.errorMessage()); + log.log(Level.WARNING, "Parameters for request " + request + " did not validate: " + request.errorCode() + " : " + request.errorMessage()); returnErrorResponse(request, request.errorCode(), "Parameters for request " + request.getShortDescription() + " did not validate: " + request.errorMessage()); return; } diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/DelayedResponseHandler.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/DelayedResponseHandler.java index 42bb2d21b55..317606ac3ef 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/DelayedResponseHandler.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/DelayedResponseHandler.java @@ -50,14 +50,14 @@ public class DelayedResponseHandler implements Runnable { rpcServer.returnOkResponse(request, config); i.incrementAndGet(); } else { - log.log(LogLevel.WARNING, "Timed out (timeout " + request.getTimeout() + ") getting config " + + log.log(Level.WARNING, "Timed out (timeout " + request.getTimeout() + ") getting config " + request.getConfigKey() + ", will retry"); } } log.log(Level.FINEST, () -> "Finished running DelayedResponseHandler. " + i.get() + " delayed responses sent in " + (System.currentTimeMillis() - start) + " ms"); } catch (Exception e) { // To avoid thread throwing exception and executor never running this again - log.log(LogLevel.WARNING, "Got exception in DelayedResponseHandler: " + Exceptions.toMessageString(e)); + log.log(Level.WARNING, "Got exception in DelayedResponseHandler: " + Exceptions.toMessageString(e)); } catch (Throwable e) { com.yahoo.protect.Process.logAndDie("Got error in DelayedResponseHandler, exiting: " + Exceptions.toMessageString(e)); } diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java index c7a79cc8d14..aae76c4f980 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java @@ -131,7 +131,7 @@ public class MemoryCache { writer.write("\n"); writer.close(); } catch (IOException e) { - log.log(LogLevel.WARNING, "Could not write to file '" + filename + "'"); + log.log(Level.WARNING, "Could not write to file '" + filename + "'"); } finally { if (writer != null) { try { diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java index 25961caf85b..12fd95b8503 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java @@ -84,7 +84,7 @@ class RpcConfigSourceClient implements ConfigSourceClient { */ private void checkConfigSources() { if (configSourceSet == null || configSourceSet.getSources() == null || configSourceSet.getSources().size() == 0) { - log.log(LogLevel.WARNING, "No config sources defined, could not check connection"); + log.log(Level.WARNING, "No config sources defined, could not check connection"); } else { Request req = new Request("ping"); for (String configSource : configSourceSet.getSources()) { diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java index 14d93ee046e..a24407588be 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UpstreamConfigSubscriber.java @@ -56,7 +56,7 @@ public class UpstreamConfigSubscriber implements Subscriber { try { updateWithNewConfig(handle); } catch (Exception e) { // To avoid thread throwing exception and loop never running this again - log.log(LogLevel.WARNING, "Got exception: " + Exceptions.toMessageString(e)); + log.log(Level.WARNING, "Got exception: " + Exceptions.toMessageString(e)); } catch (Throwable e) { com.yahoo.protect.Process.logAndDie("Got error, exiting: " + Exceptions.toMessageString(e)); } diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/CachedFilesMaintainer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/CachedFilesMaintainer.java index ffe7f7bec46..247ef8a4dbf 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/CachedFilesMaintainer.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/CachedFilesMaintainer.java @@ -74,7 +74,7 @@ class CachedFilesMaintainer implements Runnable { filesToDelete.forEach(fileReference -> { File file = new File(directory, fileReference); if (!IOUtils.recursiveDeleteDir(file)) - log.log(LogLevel.WARNING, "Could not delete " + file.getAbsolutePath()); + log.log(Level.WARNING, "Could not delete " + file.getAbsolutePath()); }); } } diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/RequestTracker.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/RequestTracker.java index 6b0be5bca16..206c0359850 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/RequestTracker.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/RequestTracker.java @@ -21,10 +21,10 @@ class RequestTracker { void trackRequest(File file) { String absolutePath = file.getAbsolutePath(); if ( ! file.exists()) - log.log(LogLevel.WARNING, "Could not find file '" + absolutePath + "'"); + log.log(Level.WARNING, "Could not find file '" + absolutePath + "'"); if ( ! file.setLastModified(Instant.now().toEpochMilli())) - log.log(LogLevel.WARNING, "Could not set last modified timestamp for '" + absolutePath + "'"); + log.log(Level.WARNING, "Could not set last modified timestamp for '" + absolutePath + "'"); } } -- cgit v1.2.3