Skip to content

Commit

Permalink
chore(update): 1112 -added logging for discoveryfinder.
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-mwesener committed Jul 23, 2024
1 parent 3f57d1a commit cd4db1f
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public Optional<Discovery> retrieveDiscoveryByFinderAndEdcDiscoveryService(Strin
DiscoveryFinderRequest request = new DiscoveryFinderRequest(List.of(bpn));
DiscoveryResponse discoveryEndpoints = discoveryFinderClient.findDiscoveryEndpoints(request);
try {
objectMapper.writeValueAsString(discoveryEndpoints);
log.info("discoveryEndpoints");
log.warn(objectMapper.writeValueAsString(discoveryEndpoints));
} catch (JsonProcessingException e) {
log.warn("Could not write value as string");
}
Expand All @@ -61,12 +62,19 @@ public Optional<Discovery> retrieveDiscoveryByFinderAndEdcDiscoveryService(Strin
log.info("endPointAddress {}", endPointAddress);
List<EdcDiscoveryResult> connectorEndpoints = discoveryFinderClient.findConnectorEndpoints(endPointAddress, List.of(bpn));
try {
objectMapper.writeValueAsString(connectorEndpoints);
log.info("connectorEndpoints");
log.warn(objectMapper.writeValueAsString(connectorEndpoints));
} catch (JsonProcessingException e) {
log.warn("Could not write value as string");
}
discoveryResults.addAll(connectorEndpoints);
});
try {
log.info("DiscoveryResult");
log.warn(objectMapper.writeValueAsString(discoveryResults));
} catch (JsonProcessingException e) {
log.warn("Could not write value as string");
}
List<EdcDiscoveryResult> discoveryResultByBPN
= discoveryResults.stream().filter(edcDiscoveryResult -> edcDiscoveryResult.bpn().equals(bpn)).toList();

Expand Down

0 comments on commit cd4db1f

Please sign in to comment.