Compare commits

...

1 Commits

Author SHA1 Message Date
Olga Maciaszek-Sharma a9b3a07c66 Switch to Apache logging. 2 years ago
  1. 18
      spring-cloud-commons/src/main/java/org/springframework/cloud/client/hypermedia/DiscoveredResource.java
  2. 6
      spring-cloud-commons/src/main/java/org/springframework/cloud/commons/ConfigDataMissingEnvironmentPostProcessor.java

18
spring-cloud-commons/src/main/java/org/springframework/cloud/client/hypermedia/DiscoveredResource.java

@ -18,8 +18,8 @@ package org.springframework.cloud.client.hypermedia; @@ -18,8 +18,8 @@ package org.springframework.cloud.client.hypermedia;
import java.net.URI;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.hateoas.Link;
@ -42,7 +42,7 @@ public class DiscoveredResource implements RemoteResource { @@ -42,7 +42,7 @@ public class DiscoveredResource implements RemoteResource {
private final TraversalDefinition traversal;
private final Logger log = LoggerFactory.getLogger(DiscoveredResource.class);
private static final Log LOG = LogFactory.getLog(DiscoveredResource.class);
private RestOperations restOperations = new RestTemplate();
@ -104,16 +104,16 @@ public class DiscoveredResource implements RemoteResource { @@ -104,16 +104,16 @@ public class DiscoveredResource implements RemoteResource {
String uri = link.expand().getHref();
this.log.debug("Verifying link pointing to {}…", uri);
LOG.debug("Verifying link pointing to " + uri);
this.restOperations.headForHeaders(uri);
this.log.debug("Successfully verified link!");
LOG.debug("Successfully verified link!");
return link;
}
catch (RestClientException o_O) {
this.log.debug("Verification failed, marking as outdated!");
LOG.debug("Verification failed, marking as outdated!");
return null;
}
}
@ -131,12 +131,12 @@ public class DiscoveredResource implements RemoteResource { @@ -131,12 +131,12 @@ public class DiscoveredResource implements RemoteResource {
URI uri = service.getUri();
String serviceId = service.getServiceId();
this.log.debug("Discovered {} system at {}. Discovering resource…", serviceId, uri);
LOG.debug("Discovered " + serviceId + " system at " + uri + ". Discovering resource…");
Traverson traverson = new Traverson(uri, MediaTypes.HAL_JSON);
Link link = this.traversal.buildTraversal(traverson).asTemplatedLink();
this.log.debug("Found link pointing to {}.", link.getHref());
LOG.debug("Found link pointing to " + link.getHref());
return link;
@ -144,7 +144,7 @@ public class DiscoveredResource implements RemoteResource { @@ -144,7 +144,7 @@ public class DiscoveredResource implements RemoteResource {
catch (RuntimeException o_O) {
this.link = null;
this.log.debug("Target system unavailable. Got: ", o_O.getMessage());
LOG.debug("Target system unavailable. Got: " + o_O.getMessage());
return null;
}

6
spring-cloud-commons/src/main/java/org/springframework/cloud/commons/ConfigDataMissingEnvironmentPostProcessor.java

@ -21,8 +21,8 @@ import java.util.Arrays; @@ -21,8 +21,8 @@ import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor;
@ -61,7 +61,7 @@ public abstract class ConfigDataMissingEnvironmentPostProcessor implements Envir @@ -61,7 +61,7 @@ public abstract class ConfigDataMissingEnvironmentPostProcessor implements Envir
*/
public static final int ORDER = ConfigDataEnvironmentPostProcessor.ORDER + 1000;
private final Logger LOG = LoggerFactory.getLogger(ConfigDataMissingEnvironmentPostProcessor.class);
private static final Log LOG = LogFactory.getLog(ConfigDataMissingEnvironmentPostProcessor.class);
@Override
public int getOrder() {

Loading…
Cancel
Save