From 3327bc6b8118c6df3b9055399d3673676ec81b1f Mon Sep 17 00:00:00 2001
From: NThakur4 <nthakur4@slb.com>
Date: Sun, 15 May 2022 18:07:53 -0500
Subject: [PATCH] change the logging level and log the exception

---
 .../org/opengroup/osdu/indexer/service/StorageServiceImpl.java  | 2 +-
 .../org/opengroup/osdu/indexer/util/ElasticClientHandler.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageServiceImpl.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageServiceImpl.java
index 95d88bc77..50363f976 100644
--- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageServiceImpl.java
+++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageServiceImpl.java
@@ -120,7 +120,7 @@ public class StorageServiceImpl implements StorageService {
         try {
             records = this.objectMapper.readValue(bulkStorageData, Records.class);
         } catch (JsonProcessingException e) {
-            throw new AppException(RequestStatus.INVALID_RECORD, "Invalid request", "Successful Storage service response with wrong json");
+            throw new AppException(RequestStatus.INVALID_RECORD, "Invalid request", "Successful Storage service response with wrong json", e);
         }
 
         // no retry possible, update record status as failed -- storage service cannot locate records
diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/util/ElasticClientHandler.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/util/ElasticClientHandler.java
index e7737e73c..44676fe3a 100644
--- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/util/ElasticClientHandler.java
+++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/util/ElasticClientHandler.java
@@ -106,7 +106,7 @@ public class ElasticClientHandler {
         new BasicHeader("xpack.security.transport.ssl.enabled", tls),
         new BasicHeader("Authorization", basicAuthenticationHeaderVal),
     };
-    log.info(String.format(
+    log.fine(String.format(
         "Elastic client connection uses protocolScheme = %s with a flag "
             + "'security.https.certificate.trust' = %s",
         protocolScheme, isSecurityHttpsCertificateTrust));
-- 
GitLab