change only compute if debug enabled

fixes gh-249
This commit is contained in:
Spencer Gibb
2018-04-02 13:25:47 -04:00
parent da853206d4
commit 8edc2e025d

View File

@@ -78,7 +78,7 @@ public class RemoteAddrRoutePredicateFactory extends AbstractRoutePredicateFacto
String hostAddress = remoteAddress.getAddress().getHostAddress();
String host = exchange.getRequest().getURI().getHost();
if (!hostAddress.equals(host)) {
if (log.isDebugEnabled() && !hostAddress.equals(host)) {
log.debug("Remote addresses didn't match " + hostAddress + " != " + host);
}