You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/11/23 08:24:45 UTC
[dubbo] branch 3.1 updated: Fix logger in ClassLoaderResourceLoader (#10995)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.1 by this push:
new 1f1995ac8c Fix logger in ClassLoaderResourceLoader (#10995)
1f1995ac8c is described below
commit 1f1995ac8c9bcf2e701677e298a348930cf77a8f
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Wed Nov 23 16:24:38 2022 +0800
Fix logger in ClassLoaderResourceLoader (#10995)
---
.../org/apache/dubbo/common/utils/ClassLoaderResourceLoader.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassLoaderResourceLoader.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassLoaderResourceLoader.java
index cd1a95df02..2b4e88e228 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassLoaderResourceLoader.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassLoaderResourceLoader.java
@@ -16,6 +16,8 @@
*/
package org.apache.dubbo.common.utils;
+import org.apache.dubbo.common.logger.Logger;
+import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.resource.GlobalResourcesRepository;
import java.io.IOException;
@@ -34,7 +36,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
public class ClassLoaderResourceLoader {
-
+ private static Logger logger = LoggerFactory.getLogger(ClassLoaderResourceLoader.class);
private static SoftReference<Map<ClassLoader, Map<String, Set<URL>>>> classLoaderResourcesCache = null;
static {
@@ -86,7 +88,7 @@ public class ClassLoaderResourceLoader {
}
}
} catch (IOException e) {
- e.printStackTrace();
+ logger.error("Exception occurred when reading SPI definitions. SPI path: " + fileName + " ClassLoader name: " + currentClassLoader, e);
}
urlCache.put(fileName, set);
}