You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/10/26 12:21:01 UTC

[incubator-eventmesh] branch master updated: Refactor. Add logger to record raw exception information

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

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new ba64c77f Refactor. Add logger to record raw exception information
     new 7adf1139 Merge pull request #1882 from krittysv/master
ba64c77f is described below

commit ba64c77ffa518d139e14db9a9240a16200c94d23
Author: krittysv <kr...@thoughtworks.com>
AuthorDate: Wed Oct 26 14:39:36 2022 +0530

    Refactor. Add logger to record raw exception information
---
 .../eventmesh/connector/kafka/config/ConfigurationWrapper.java      | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ConfigurationWrapper.java b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ConfigurationWrapper.java
index 040a0a5a..cd0d1064 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ConfigurationWrapper.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ConfigurationWrapper.java
@@ -34,9 +34,13 @@ import java.util.Properties;
 import lombok.experimental.UtilityClass;
 import lombok.extern.slf4j.Slf4j;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 @Slf4j
 @UtilityClass
 public class ConfigurationWrapper {
+    public static final Logger logger = LoggerFactory.getLogger(ConfigurationWrapper.class);
 
     private static final Properties properties = new Properties();
 
@@ -59,6 +63,7 @@ public class ConfigurationWrapper {
                 properties.load(resourceAsStream);
             }
         } catch (IOException e) {
+            logger.error("Error while loading from classpath:", e);
             throw new RuntimeException(String.format("Load %s.properties file from classpath error", EventMeshConstants.EVENTMESH_CONF_FILE));
         }
         try {
@@ -71,6 +76,7 @@ public class ConfigurationWrapper {
                 }
             }
         } catch (IOException e) {
+            logger.error("Error while loading from conf home: ", e);
             throw new IllegalArgumentException(String.format("Cannot load %s file from conf", EventMeshConstants.EVENTMESH_CONF_FILE));
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org