From a2560fb33659953e658360b23d63abd0cc29fa77 Mon Sep 17 00:00:00 2001 From: Matteo Stanislao Giarrusso Date: Wed, 23 Oct 2024 15:20:46 +0200 Subject: [PATCH] fixing logs bug --- .../glaciation/TradeOffService/service/MetadataService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glaciation/TradeOffService/service/MetadataService.java b/src/main/java/com/glaciation/TradeOffService/service/MetadataService.java index dc41612..71135f5 100644 --- a/src/main/java/com/glaciation/TradeOffService/service/MetadataService.java +++ b/src/main/java/com/glaciation/TradeOffService/service/MetadataService.java @@ -30,7 +30,9 @@ public class MetadataService { private String metadataServiceWorkloadsSparqlQuery; private JsonNode getQueryResult(JsonNode responseBody) { - logger.info("Metadata service response body: {}{}", responseBody.toString().substring(0, 1000), responseBody.toString().length() > 1000 ? "..." : ""); + String responseBodyString = responseBody.toString(); + String responseBodyLog = responseBodyString.length() > 1000 ? responseBodyString.substring(0, 1000) + "..." : responseBodyString; + logger.info("Metadata service response body: {}", responseBodyLog); return responseBody.get("results").get("bindings"); }