You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by bo...@apache.org on 2023/10/20 13:50:01 UTC

[streampipes] 01/01: refactor: rename logger

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

bossenti pushed a commit to branch rename-logger
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 1af83196ca925bc1a50fb0319163e4a81c1c8463
Author: bossenti <bo...@posteo.de>
AuthorDate: Fri Oct 20 15:49:50 2023 +0200

    refactor: rename logger
---
 .../management/management/WorkerRestClient.java    | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/streampipes-connect-management/src/main/java/org/apache/streampipes/connect/management/management/WorkerRestClient.java b/streampipes-connect-management/src/main/java/org/apache/streampipes/connect/management/management/WorkerRestClient.java
index 58f6a49bc..5efefd652 100644
--- a/streampipes-connect-management/src/main/java/org/apache/streampipes/connect/management/management/WorkerRestClient.java
+++ b/streampipes-connect-management/src/main/java/org/apache/streampipes/connect/management/management/WorkerRestClient.java
@@ -48,7 +48,7 @@ import java.util.List;
  */
 public class WorkerRestClient {
 
-  private static final Logger logger = LoggerFactory.getLogger(WorkerRestClient.class);
+  private static final Logger LOG = LoggerFactory.getLogger(WorkerRestClient.class);
 
   public static void invokeStreamAdapter(String endpointUrl,
                                          String elementId) throws AdapterException {
@@ -72,7 +72,7 @@ public class WorkerRestClient {
 
   public static List<AdapterDescription> getAllRunningAdapterInstanceDescriptions(String url) throws AdapterException {
     try {
-      logger.info("Requesting all running adapter description instances: " + url);
+      LOG.info("Requesting all running adapter description instances: " + url);
       var responseString = ExtensionServiceExecutions
           .extServiceGetRequest(url)
           .execute().returnContent().asString();
@@ -81,14 +81,14 @@ public class WorkerRestClient {
 
       return result;
     } catch (IOException e) {
-      logger.error("List of running adapters could not be fetched", e);
+      LOG.error("List of running adapters could not be fetched", e);
       throw new AdapterException("List of running adapters could not be fetched from: " + url);
     }
   }
 
   public static void startAdapter(String url,
                                   AdapterDescription ad) throws AdapterException {
-    logger.info("Trying to start adapter on endpoint {} ", url);
+    LOG.info("Trying to start adapter on endpoint {} ", url);
     triggerAdapterStateChange(ad, url, "started");
   }
 
@@ -96,7 +96,7 @@ public class WorkerRestClient {
   public static void stopAdapter(AdapterDescription ad,
                                  String url) throws AdapterException {
 
-    logger.info("Trying to stop adapter on endpoint {} ", url);
+    LOG.info("Trying to stop adapter on endpoint {} ", url);
     triggerAdapterStateChange(ad, url, "stopped");
   }
 
@@ -114,10 +114,10 @@ public class WorkerRestClient {
         throw new AdapterException(exception.getMessage(), exception.getCause());
       }
 
-      logger.info("Adapter {} on endpoint: " + url + " with Response: ", ad.getName() + responseString);
+      LOG.info("Adapter {} on endpoint: " + url + " with Response: ", ad.getName() + responseString);
 
     } catch (IOException e) {
-      logger.error("Adapter was not {} successfully", action, e);
+      LOG.error("Adapter was not {} successfully", action, e);
       throw new AdapterException("Adapter was not " + action + " successfully with url " + url, e);
     }
   }
@@ -161,7 +161,7 @@ public class WorkerRestClient {
 
   public static String getAssets(String workerPath) throws AdapterException {
     String url = workerPath + "/assets";
-    logger.info("Trying to Assets from endpoint: " + url);
+    LOG.info("Trying to Assets from endpoint: " + url);
 
     try {
       return Request.Get(url)
@@ -169,7 +169,7 @@ public class WorkerRestClient {
           .socketTimeout(100000)
           .execute().returnContent().asString();
     } catch (IOException e) {
-      logger.error(e.getMessage());
+      LOG.error(e.getMessage());
       throw new AdapterException("Could not get assets endpoint: " + url);
     }
 
@@ -185,7 +185,7 @@ public class WorkerRestClient {
           .execute().returnContent().asBytes();
       return responseString;
     } catch (IOException e) {
-      logger.error(e.getMessage());
+      LOG.error(e.getMessage());
       throw new AdapterException("Could not get icon endpoint: " + url);
     }
   }
@@ -199,7 +199,7 @@ public class WorkerRestClient {
           .socketTimeout(100000)
           .execute().returnContent().asString();
     } catch (IOException e) {
-      logger.error(e.getMessage());
+      LOG.error(e.getMessage());
       throw new AdapterException("Could not get documentation endpoint: " + url);
     }
   }