From fc4a518865386bf1e1ac759be7b52f60fb358d05 Mon Sep 17 00:00:00 2001 From: JervyShi Date: Wed, 15 Jun 2022 16:38:59 +0800 Subject: [PATCH] fix hessian logger config use wrong path and internal logger (#78) --- pom.xml | 2 +- .../alipay/hessian/NameBlackListFilter.java | 6 +- .../sofa/hessian/log/log4j/log-conf.xml | 39 ++++++++++++ .../log/log4j2/log-conf.xml | 4 +- .../log/logback/log-conf.xml | 4 +- .../middleware/config/log/log4j/log-conf.xml | 61 ------------------- 6 files changed, 47 insertions(+), 69 deletions(-) create mode 100644 src/main/resources/com/alipay/sofa/hessian/log/log4j/log-conf.xml rename src/main/resources/com/alipay/sofa/{middleware/config => hessian}/log/log4j2/log-conf.xml (92%) rename src/main/resources/com/alipay/sofa/{middleware/config => hessian}/log/logback/log-conf.xml (97%) delete mode 100644 src/main/resources/com/alipay/sofa/middleware/config/log/log4j/log-conf.xml diff --git a/pom.xml b/pom.xml index c7c7706..4c7aa3d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.alipay.sofa hessian - 3.3.13 + 3.4.0 jar ${project.groupId}:${project.artifactId} diff --git a/src/main/java/com/alipay/hessian/NameBlackListFilter.java b/src/main/java/com/alipay/hessian/NameBlackListFilter.java index 45880d9..46c6eb0 100644 --- a/src/main/java/com/alipay/hessian/NameBlackListFilter.java +++ b/src/main/java/com/alipay/hessian/NameBlackListFilter.java @@ -34,11 +34,11 @@ public class NameBlackListFilter implements ClassNameFilter { //do not change this public static final String HESSIAN_SERIALIZE_LOG_NAME = "HessianSerializeLog"; - public static final String CONFIG_LOG_SPACE_NAME = "com.alipay.sofa.middleware.config"; + public static final String CONFIG_LOG_SPACE_NAME = "com.alipay.sofa.hessian"; - private static final String CLIENT_LOG_LEVEL = "com.alipay.sofa.middleware.config.log.level"; + private static final String CLIENT_LOG_LEVEL = "com.alipay.sofa.hessian.log.level"; private static final String CLIENT_LOG_LEVEL_DEFAULT = "INFO"; - private static final String CLIENT_LOG_ENCODE = "com.alipay.sofa.middleware.config.log.encode"; + private static final String CLIENT_LOG_ENCODE = "com.alipay.sofa.hessian.log.encode"; private static final String COMMON_ENCODE = "file.encoding"; private static final String CLIENT_LOG_ENCODE_DEFAULT = "UTF-8"; diff --git a/src/main/resources/com/alipay/sofa/hessian/log/log4j/log-conf.xml b/src/main/resources/com/alipay/sofa/hessian/log/log4j/log-conf.xml new file mode 100644 index 0000000..e257b02 --- /dev/null +++ b/src/main/resources/com/alipay/sofa/hessian/log/log4j/log-conf.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/com/alipay/sofa/middleware/config/log/log4j2/log-conf.xml b/src/main/resources/com/alipay/sofa/hessian/log/log4j2/log-conf.xml similarity index 92% rename from src/main/resources/com/alipay/sofa/middleware/config/log/log4j2/log-conf.xml rename to src/main/resources/com/alipay/sofa/hessian/log/log4j2/log-conf.xml index 2e882f0..d4d0f50 100644 --- a/src/main/resources/com/alipay/sofa/middleware/config/log/log4j2/log-conf.xml +++ b/src/main/resources/com/alipay/sofa/hessian/log/log4j2/log-conf.xml @@ -4,8 +4,8 @@ ${sys:logging.path}/serialize - ${sys:com.alipay.sofa.middleware.config.log.level} - ${sys:com.alipay.sofa.middleware.config.log.encode} + ${sys:com.alipay.sofa.hessian.log.level} + ${sys:com.alipay.sofa.hessian.log.encode} diff --git a/src/main/resources/com/alipay/sofa/middleware/config/log/logback/log-conf.xml b/src/main/resources/com/alipay/sofa/hessian/log/logback/log-conf.xml similarity index 97% rename from src/main/resources/com/alipay/sofa/middleware/config/log/logback/log-conf.xml rename to src/main/resources/com/alipay/sofa/hessian/log/logback/log-conf.xml index 72a6dcd..b9cceb8 100644 --- a/src/main/resources/com/alipay/sofa/middleware/config/log/logback/log-conf.xml +++ b/src/main/resources/com/alipay/sofa/hessian/log/logback/log-conf.xml @@ -3,8 +3,8 @@ - - + + diff --git a/src/main/resources/com/alipay/sofa/middleware/config/log/log4j/log-conf.xml b/src/main/resources/com/alipay/sofa/middleware/config/log/log4j/log-conf.xml deleted file mode 100644 index ea34d20..0000000 --- a/src/main/resources/com/alipay/sofa/middleware/config/log/log4j/log-conf.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file