You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2024/01/16 22:06:18 UTC

(camel-karavan) branch main updated: CamelService less verbose

This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git


The following commit(s) were added to refs/heads/main by this push:
     new 008ad2a6 CamelService less verbose
008ad2a6 is described below

commit 008ad2a6ace03ede6335e18c1ee99ec082f91744
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Tue Jan 16 17:06:11 2024 -0500

    CamelService less verbose
---
 .../org/apache/camel/karavan/service/CamelService.java   | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/service/CamelService.java b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/service/CamelService.java
index c8dbcded..55c5f5c6 100644
--- a/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/service/CamelService.java
+++ b/karavan-web/karavan-app/src/main/java/org/apache/camel/karavan/service/CamelService.java
@@ -79,7 +79,7 @@ public class CamelService {
 
     @Scheduled(every = "{karavan.camel.status.interval}", concurrentExecution = Scheduled.ConcurrentExecution.SKIP)
     public void collectCamelStatuses() {
-        LOGGER.info("Collect Camel Statuses");
+        LOGGER.debug("Collect Camel Statuses");
         if (infinispanService.isReady()) {
             infinispanService.getContainerStatuses(environment).stream()
                     .filter(cs ->
@@ -97,7 +97,7 @@ public class CamelService {
 
     @ConsumeEvent(value = RELOAD_PROJECT_CODE, blocking = true, ordered = true)
     public void reloadProjectCode(String projectId) {
-        LOGGER.info("Reload project code " + projectId);
+        LOGGER.debug("Reload project code " + projectId);
         try {
             deleteRequest(projectId);
             Map<String, String> files = codeService.getProjectFilesForDevMode(projectId, true);
@@ -119,7 +119,7 @@ public class CamelService {
                     .timeout(timeout).sendBuffer(Buffer.buffer(body)).subscribeAsCompletionStage().toCompletableFuture().get();
             return result.statusCode() == 200;
         } catch (Exception e) {
-            LOGGER.info(e.getMessage());
+            LOGGER.error(e.getMessage());
         }
         return false;
     }
@@ -180,7 +180,7 @@ public class CamelService {
     public void collectCamelStatuses(JsonObject data) {
         CamelStatusRequest dms = data.getJsonObject("camelStatusRequest").mapTo(CamelStatusRequest.class);
         ContainerStatus containerStatus = data.getJsonObject("containerStatus").mapTo(ContainerStatus.class);
-        LOGGER.info("Collect Camel Status for " + containerStatus.getContainerName());
+        LOGGER.debug("Collect Camel Status for " + containerStatus.getContainerName());
         String projectId = dms.getProjectId();
         String containerName = dms.getContainerName();
         List<CamelStatusValue> statuses = new ArrayList<>();
@@ -204,7 +204,7 @@ public class CamelService {
                 return res.encodePrettily();
             }
         } catch (Exception e) {
-            LOGGER.info(e.getMessage());
+            LOGGER.error(e.getMessage());
         }
         return null;
     }
@@ -213,10 +213,10 @@ public class CamelService {
         try {
             HttpResponse<Buffer> result = getWebClient().deleteAbs(url)
                     .timeout(timeout).send().subscribeAsCompletionStage().toCompletableFuture().get();
-                JsonObject res = result.bodyAsJsonObject();
-                return res.encodePrettily();
+            JsonObject res = result.bodyAsJsonObject();
+            return res.encodePrettily();
         } catch (Exception e) {
-            LOGGER.info(e.getMessage());
+            LOGGER.error(e.getMessage());
         }
         return null;
     }