move from slf4j to commons logging
This commit is contained in:
@@ -21,7 +21,7 @@ import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
|
||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.context.EnvironmentAware;
|
||||
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
|
||||
* @author Spencer Gibb
|
||||
* @author Dave Syer
|
||||
*/
|
||||
@Slf4j
|
||||
@CommonsLog
|
||||
public abstract class SingleImplementationImportSelector<T> implements
|
||||
DeferredImportSelector, BeanClassLoaderAware, EnvironmentAware {
|
||||
|
||||
@@ -74,9 +74,8 @@ public abstract class SingleImplementationImportSelector<T> implements
|
||||
if (factories.size() > 1) {
|
||||
String factory = factories.get(0);
|
||||
// there should only every be one DiscoveryClient
|
||||
log.warn("More than one implementation "
|
||||
+ "of @{}. Using {} out of available {}", getSimpleName(), factory,
|
||||
factories);
|
||||
log.warn("More than one implementation " + "of @" + getSimpleName()
|
||||
+ ". Using " + factory + " out of available " + factories);
|
||||
factories = Collections.singletonList(factory);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.cloud.client.discovery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
|
||||
import org.springframework.boot.actuate.health.Health;
|
||||
import org.springframework.boot.actuate.health.Status;
|
||||
@@ -27,7 +27,7 @@ import org.springframework.core.Ordered;
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
*/
|
||||
@Slf4j
|
||||
@CommonsLog
|
||||
public class DiscoveryClientHealthIndicator implements DiscoveryHealthIndicator, Ordered {
|
||||
|
||||
private int order = Ordered.HIGHEST_PRECEDENCE;
|
||||
|
||||
@@ -21,8 +21,7 @@ import java.net.UnknownHostException;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
@@ -45,12 +44,10 @@ import org.springframework.core.env.Environment;
|
||||
@EnableConfigurationProperties
|
||||
@ConditionalOnMissingClass(name = "com.netflix.discovery.EurekaClientConfig")
|
||||
@ConditionalOnProperty(value = "eureka.client.enabled", havingValue = "false")
|
||||
@CommonsLog
|
||||
public class NoopDiscoveryClientConfiguration implements
|
||||
ApplicationListener<ContextRefreshedEvent> {
|
||||
|
||||
private static final Logger logger = LoggerFactory
|
||||
.getLogger(NoopDiscoveryClientConfiguration.class);
|
||||
|
||||
@Autowired(required = false)
|
||||
private ServerProperties server;
|
||||
|
||||
@@ -69,7 +66,7 @@ public class NoopDiscoveryClientConfiguration implements
|
||||
host = InetAddress.getLocalHost().getHostName();
|
||||
}
|
||||
catch (UnknownHostException e) {
|
||||
logger.error("Cannot get host info", e);
|
||||
log.error("Cannot get host info", e);
|
||||
}
|
||||
int port = 0;
|
||||
if (this.server != null && this.server.getPort() != null) {
|
||||
|
||||
Reference in New Issue
Block a user