move from slf4j to commons logging

This commit is contained in:
Spencer Gibb
2015-01-15 14:34:55 -07:00
parent bfe651860e
commit 83485f77f6
3 changed files with 9 additions and 13 deletions

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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) {