From 0a3c5a75ba8a707fb12cbe46ddf3948871ba9aad Mon Sep 17 00:00:00 2001 From: siddhant Date: Tue, 8 Jun 2021 11:13:29 +0530 Subject: [PATCH 1/2] Changed logging levels in propertySourceBootstrapConfiguration. Fixes gh-949 --- .../config/PropertySourceBootstrapConfiguration.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java index 1822e5bc2..f29b5394e 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java @@ -106,7 +106,10 @@ public void initialize(ConfigurableApplicationContext applicationContext) { sourceList.add(new SimpleBootstrapPropertySource(p)); } } - logger.info("Located property source: " + sourceList); + logger.info("Located property source. Property names: " + sourceList.stream().map( + PropertySource::getName).collect(Collectors.toList())); + logger.debug("Property values: " + sourceList.stream().map( + PropertySource::getSource).collect(Collectors.toList())); composite.addAll(sourceList); empty = false; } From 29fcc77d33a4120097d8716f6065985a62967030 Mon Sep 17 00:00:00 2001 From: siddhant Date: Tue, 8 Jun 2021 11:51:02 +0530 Subject: [PATCH 2/2] Added import --- .../config/PropertySourceBootstrapConfiguration.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java index f29b5394e..43a0c1ed3 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceBootstrapConfiguration.java @@ -23,6 +23,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; +import java.util.stream.Collectors; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -106,10 +107,10 @@ public void initialize(ConfigurableApplicationContext applicationContext) { sourceList.add(new SimpleBootstrapPropertySource(p)); } } - logger.info("Located property source. Property names: " + sourceList.stream().map( - PropertySource::getName).collect(Collectors.toList())); - logger.debug("Property values: " + sourceList.stream().map( - PropertySource::getSource).collect(Collectors.toList())); + logger.info("Located property source. Property names: " + + sourceList.stream().map(PropertySource::getName).collect(Collectors.toList())); + logger.debug("Property values: " + + sourceList.stream().map(PropertySource::getSource).collect(Collectors.toList())); composite.addAll(sourceList); empty = false; }