Handle errror logging not enabled.

This commit is contained in:
Olga MaciaszekSharma
2021-07-12 20:02:18 +02:00
parent c59c256fa6
commit bae3ddd4ea

View File

@@ -109,7 +109,9 @@ public class DiscoveryClientServiceInstanceListSupplier implements ServiceInstan
}
private void logException(Throwable error) {
LOG.error(String.format("Exception occurred while retrieving instances for service %s", serviceId), error);
if (LOG.isErrorEnabled()) {
LOG.error(String.format("Exception occurred while retrieving instances for service %s", serviceId), error);
}
}
}