From db2e87f1b6152dec7950d4f451eb17443206aec1 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 13 Nov 2015 11:51:02 +0000 Subject: [PATCH] Switch log to debug from info Logging each request in the proxy is too verbose and inconsistent with other Spring MVC logging. --- .../zuul/filters/ProxyRouteLocator.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ProxyRouteLocator.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ProxyRouteLocator.java index 31b6212a..b0b1e70c 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ProxyRouteLocator.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ProxyRouteLocator.java @@ -57,12 +57,14 @@ public class ProxyRouteLocator implements RouteLocator { public ProxyRouteLocator(String servletPath, DiscoveryClient discovery, ZuulProperties properties) { - if (StringUtils.hasText(servletPath)) { // a servletPath is passed explicitly - this.servletPath = servletPath; - } else { - //set Zuul servlet path - this.servletPath = properties.getServletPath() != null? properties.getServletPath() : ""; - } + if (StringUtils.hasText(servletPath)) { // a servletPath is passed explicitly + this.servletPath = servletPath; + } + else { + // set Zuul servlet path + this.servletPath = properties.getServletPath() != null + ? properties.getServletPath() : ""; + } if (properties.isIgnoreLocalService()) { ServiceInstance instance = discovery.getLocalServiceInstance(); @@ -111,7 +113,9 @@ public class ProxyRouteLocator implements RouteLocator { } public ProxyRouteSpec getMatchingRoute(String path) { - log.info("Finding route for path: " + path); + if (log.isDebugEnabled()) { + log.debug("Finding route for path: " + path); + } String location = null; String targetPath = null; @@ -151,8 +155,8 @@ public class ProxyRouteLocator implements RouteLocator { } } } - return (location == null ? null : new ProxyRouteSpec(id, targetPath, location, - prefix, retryable)); + return (location == null ? null + : new ProxyRouteSpec(id, targetPath, location, prefix, retryable)); } protected boolean matchesIgnoredPatterns(String path) {