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);
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;
@Getter
@EqualsAndHashCode
@NoArgsConstructor
-@ToString
public class MapperConfig implements Configurable {
public static final String CLIENT_NAME = "pm-mapper";
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
@GSONRequired
@SerializedName("subscriber_id")
private String subscriberId;
+
+ @Override
+ public String toString() {
+ return "SubscriberConfig{" +
+ "username=" + username +
+ ", password= *****" +
+ ", drLocation='" + drLocation + '\'' +
+ ", deliveryUrl='" + deliveryUrl + '\'' +
+ ", subscriberId='" + subscriberId + '\'' +
+ '}';
+ }
}
<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"/>
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();
}