diff options
5 files changed, 29 insertions, 7 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandler.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandler.java index 273c953..31fa145 100644 --- a/src/main/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandler.java +++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandler.java @@ -73,9 +73,6 @@ public class ConfigHandler { mapperConfigJson = sender.send(requestURL); } catch (Exception exception) { throw new CBSServerError("Error connecting to Configbinding Service: ", exception); - } finally { - logger.unwrap().info("Received pm-mapper configuration from ConfigBinding Service: \n"); - logger.unwrap().debug(mapperConfigJson); } return convertMapperConfigToObject(mapperConfigJson); diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java index ac315ac..a71696b 100644 --- a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java +++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java @@ -25,7 +25,6 @@ import com.google.gson.annotations.SerializedName; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; -import lombok.ToString; import org.onap.dcaegen2.services.pmmapper.config.Configurable; import org.onap.dcaegen2.services.pmmapper.utils.DMaaPAdapter; import org.onap.dcaegen2.services.pmmapper.utils.GSONRequired; @@ -34,7 +33,6 @@ import org.onap.dcaegen2.services.pmmapper.utils.MeasFilterConfigAdapter; @Getter @EqualsAndHashCode @NoArgsConstructor -@ToString public class MapperConfig implements Configurable { public static final String CLIENT_NAME = "pm-mapper"; @@ -112,4 +110,21 @@ public class MapperConfig implements Configurable { this.aafPassword = mapperConfig.getAafPassword(); } } + + @Override + public String toString() { + return "MapperConfig{" + + "enableHttp=" + enableHttp + + ", keyStorePath='" + keyStorePath + '\'' + + ", keyStorePassPath='" + keyStorePassPath + '\'' + + ", trustStorePath='" + trustStorePath + '\'' + + ", trustStorePassPath='" + trustStorePassPath + '\'' + + ", dmaapDRDeleteEndpoint='" + dmaapDRDeleteEndpoint + '\'' + + ", filterConfig=" + filterConfig + + ", aafUsername='" + aafUsername + '\'' + + ", aafPassword= *****" + + ", subscriberConfig=" + subscriberConfig + + ", publisherConfig=" + publisherConfig + + '}'; + } }
\ No newline at end of file diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/SubscriberConfig.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/SubscriberConfig.java index 65f680b..c53d36d 100644 --- a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/SubscriberConfig.java +++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/SubscriberConfig.java @@ -44,4 +44,15 @@ public class SubscriberConfig { @GSONRequired @SerializedName("subscriber_id") private String subscriberId; + + @Override + public String toString() { + return "SubscriberConfig{" + + "username=" + username + + ", password= *****" + + ", drLocation='" + drLocation + '\'' + + ", deliveryUrl='" + deliveryUrl + '\'' + + ", subscriberId='" + subscriberId + '\'' + + '}'; + } } diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 94d2151..9bc2961 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -10,7 +10,7 @@ <property name="p_lvl" value="%level"/> <property name="p_log" value="%logger"/> <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/> - <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_msg" value="%replace(%replace(%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}){'"aaf_password": "[^"]*"' , '"aaf_password": *****'}){'"password": "[^"]*"' , '"password": *****'}"/> <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/> <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/> <property name="p_thr" value="%thread"/> diff --git a/src/test/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandlerTests.java b/src/test/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandlerTests.java index 2cbfffa..fd144cc 100644 --- a/src/test/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandlerTests.java +++ b/src/test/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandlerTests.java @@ -104,7 +104,6 @@ class ConfigHandlerTests { assertEquals(expectedConfig.getPublisherUserName(), actualConfig.getPublisherUserName()); assertEquals(expectedConfig.getPublisherPassword(), actualConfig.getPublisherPassword()); assertEquals(expectedConfig, actualConfig); - assertTrue(logAppender.list.get(1).getMessage().contains("Received pm-mapper configuration from ConfigBinding Service")); logAppender.stop(); } |