From 92cc01c029fac6a92d3ca3564f881ac00cabadd9 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Wed, 23 Sep 2015 10:34:34 +0100 Subject: [PATCH] Add INFO logging for config server URL in client Fixes gh-232 --- .../config/client/ConfigServicePropertySourceLocator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java b/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java index 8aeec429..089dac85 100644 --- a/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java +++ b/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java @@ -64,12 +64,13 @@ public class ConfigServicePropertySourceLocator implements PropertySourceLocator @Retryable(interceptor = "configServerRetryInterceptor") public org.springframework.core.env.PropertySource locate( org.springframework.core.env.Environment environment) { - ConfigClientProperties client = defaults.override(environment); + ConfigClientProperties client = this.defaults.override(environment); CompositePropertySource composite = new CompositePropertySource("configService"); RestTemplate restTemplate = this.restTemplate == null ? getSecureRestTemplate(client) : this.restTemplate; Exception error = null; String errorBody = null; + logger.info("Fetching config from server at: " + client.getRawUri()); try { String[] labels = new String[]{""}; if (StringUtils.hasText(client.getLabel())) { @@ -790,7 +791,7 @@ final class Base64 { // There's a bad input character in the Base64 stream. throw new InvalidBase64CharacterException(String.format( "Bad Base64 input character decimal %d in array position %d", - ((int) source[i]) & 0xFF, i)); + (source[i]) & 0xFF, i)); } }