Commit db2e87f1 by Dave Syer

Switch log to debug from info

Logging each request in the proxy is too verbose and inconsistent with other Spring MVC logging.
parent db4c82c3
...@@ -57,12 +57,14 @@ public class ProxyRouteLocator implements RouteLocator { ...@@ -57,12 +57,14 @@ public class ProxyRouteLocator implements RouteLocator {
public ProxyRouteLocator(String servletPath, DiscoveryClient discovery, public ProxyRouteLocator(String servletPath, DiscoveryClient discovery,
ZuulProperties properties) { ZuulProperties properties) {
if (StringUtils.hasText(servletPath)) { // a servletPath is passed explicitly if (StringUtils.hasText(servletPath)) { // a servletPath is passed explicitly
this.servletPath = servletPath; this.servletPath = servletPath;
} else { }
//set Zuul servlet path else {
this.servletPath = properties.getServletPath() != null? properties.getServletPath() : ""; // set Zuul servlet path
} this.servletPath = properties.getServletPath() != null
? properties.getServletPath() : "";
}
if (properties.isIgnoreLocalService()) { if (properties.isIgnoreLocalService()) {
ServiceInstance instance = discovery.getLocalServiceInstance(); ServiceInstance instance = discovery.getLocalServiceInstance();
...@@ -111,7 +113,9 @@ public class ProxyRouteLocator implements RouteLocator { ...@@ -111,7 +113,9 @@ public class ProxyRouteLocator implements RouteLocator {
} }
public ProxyRouteSpec getMatchingRoute(String path) { 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 location = null;
String targetPath = null; String targetPath = null;
...@@ -151,8 +155,8 @@ public class ProxyRouteLocator implements RouteLocator { ...@@ -151,8 +155,8 @@ public class ProxyRouteLocator implements RouteLocator {
} }
} }
} }
return (location == null ? null : new ProxyRouteSpec(id, targetPath, location, return (location == null ? null
prefix, retryable)); : new ProxyRouteSpec(id, targetPath, location, prefix, retryable));
} }
protected boolean matchesIgnoredPatterns(String path) { protected boolean matchesIgnoredPatterns(String path) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment