From cd4db1f9c1e9c9e86a89537327313b55bb9894b9 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 23 Jul 2024 17:36:22 +0200 Subject: [PATCH] chore(update): 1112 -added logging for discoveryfinder. --- .../repository/FeignDiscoveryRepositoryImpl.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java index c1dc427417..0301071c44 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java @@ -51,7 +51,8 @@ public Optional 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"); } @@ -61,12 +62,19 @@ public Optional retrieveDiscoveryByFinderAndEdcDiscoveryService(Strin log.info("endPointAddress {}", endPointAddress); List 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 discoveryResultByBPN = discoveryResults.stream().filter(edcDiscoveryResult -> edcDiscoveryResult.bpn().equals(bpn)).toList();