Simplify Log.info logic (#556)

This commit is contained in:
Michal Domagala
2021-07-05 12:43:59 +02:00
committed by GitHub
parent 00ea88c67f
commit baf7cf95f2

View File

@@ -373,12 +373,9 @@ public class FeignClientFactoryBean implements FactoryBean<Object>, Initializing
Feign.Builder builder = feign(context);
if (!StringUtils.hasText(url)) {
if (url != null && LOG.isInfoEnabled()) {
LOG.info(
"The provided URL is empty. Will try picking an instance via load-balancing.");
}
else if (LOG.isDebugEnabled()) {
LOG.debug("URL not provided. Will use LoadBalancer.");
if (LOG.isInfoEnabled()) {
LOG.info("For '" + name + "' URL not provided. Will try picking an instance via load-balancing.");
}
if (!name.startsWith("http")) {
url = "http://" + name;