From 4116a52c116258212b6205427b052bac8555e06f Mon Sep 17 00:00:00 2001 From: oxsean Date: Fri, 17 Nov 2023 23:11:16 +0800 Subject: [PATCH] feat(logging): #13378 Uniformly use log4j2 as the logging component --- dubbo-cluster/pom.xml | 4 +- .../support/FailbackClusterInvokerTest.java | 2 +- dubbo-cluster/src/test/resources/log4j.xml | 38 ------ .../src/test/resources/log4j2-test.xml | 33 +++++ dubbo-common/pom.xml | 4 +- .../dubbo/common/utils/DubboAppender.java | 116 +++++++++++++++--- .../org/apache/dubbo/common/utils/Log.java | 4 +- .../apache/dubbo/common/utils/LogUtil.java | 3 +- .../core/config/plugins/Log4j2Plugins.dat | Bin 0 -> 78 bytes .../cache/FileCacheStoreFactoryTest.java | 4 +- .../common/cache/FileCacheStoreTest.java | 4 +- .../dubbo/common/utils/DubboAppenderTest.java | 18 +-- .../apache/dubbo/common/utils/LogTest.java | 3 +- .../dubbo/common/utils/LogUtilTest.java | 3 +- dubbo-common/src/test/resources/log4j.xml | 41 ------- .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-compatible/pom.xml | 9 +- .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-config/dubbo-config-api/pom.xml | 4 +- .../src/test/resources/log4j.xml | 28 ----- dubbo-config/dubbo-config-spring/pom.xml | 4 +- .../src/test/resources/log4j.xml | 35 ------ dubbo-config/dubbo-config-spring6/pom.xml | 4 +- .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../dubbo-container-spring/pom.xml | 4 +- .../src/test/resources/log4j.xml | 29 ----- .../src/test/resources/log4j2-test.xml | 29 +++++ .../dubbo-demo-annotation-consumer/pom.xml | 4 + .../src/main/resources/log4j.properties | 7 -- .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-annotation-provider/pom.xml | 4 + .../src/main/resources/log4j.properties | 7 -- .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-api-consumer/pom.xml | 4 + .../src/main/resources/log4j.properties | 7 -- .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-api-provider/pom.xml | 4 + .../src/main/resources/log4j.properties | 7 -- .../src/main/resources/log4j2.xml | 29 +++++ dubbo-demo/dubbo-demo-generic-call/pom.xml | 5 +- .../src/main/resources/log4j.properties | 7 -- .../src/main/resources/log4j2.xml | 29 +++++ dubbo-demo/dubbo-demo-interface/pom.xml | 5 + .../dubbo-demo-native-consumer/pom.xml | 5 +- .../demo/graalvm/consumer/Application.java | 2 +- .../src/main/resources/Log4j.properties | 24 ---- .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-native-provider/pom.xml | 8 +- .../demo/graalvm/provider/Application.java | 2 +- .../src/main/resources/Log4j.properties | 27 ---- .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-spring-boot-consumer/pom.xml | 28 +++-- .../src/main/resources/log4j.properties | 7 -- .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-spring-boot-provider/pom.xml | 11 ++ .../src/main/resources/log4j.properties | 7 -- .../src/main/resources/log4j2.xml | 29 +++++ dubbo-demo/dubbo-demo-spring-boot/pom.xml | 16 +-- dubbo-demo/dubbo-demo-triple/pom.xml | 4 + .../src/main/resources/log4j.properties | 26 ---- .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-jaxrs-rest-consumer/pom.xml | 4 + .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-jaxrs-rest-provider/pom.xml | 4 + .../src/main/resources/log4j2.xml | 29 +++++ .../pom.xml | 4 + .../src/main/resources/log4j2.xml | 29 +++++ .../pom.xml | 4 + .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-xml-consumer/pom.xml | 4 + .../src/main/resources/log4j.properties | 7 -- .../src/main/resources/log4j2.xml | 29 +++++ .../dubbo-demo-xml-provider/pom.xml | 4 + .../src/main/resources/log4j.properties | 7 -- .../src/main/resources/log4j2.xml | 29 +++++ dubbo-demo/pom.xml | 7 -- dubbo-dependencies-bom/pom.xml | 26 ++-- .../pom.xml | 15 +-- .../dubbo-dependencies-zookeeper/pom.xml | 1 + dubbo-dependencies/pom.xml | 1 + .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-metadata/dubbo-metadata-rest/pom.xml | 33 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-monitor/dubbo-monitor-default/pom.xml | 4 +- .../src/test/resources/log4j.properties | 7 -- .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-plugin/dubbo-plugin-access-log/pom.xml | 5 + .../src/test/resources/log4j.xml | 46 ------- .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-plugin/pom.xml | 4 +- dubbo-registry/dubbo-registry-api/pom.xml | 5 +- .../metadata/store/MetaCacheManagerTest.java | 4 +- .../src/test/resources/log4j.xml | 29 ----- .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-registry/dubbo-registry-nacos/pom.xml | 4 +- .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-remoting/dubbo-remoting-api/pom.xml | 4 +- .../src/test/resources/log4j.xml | 35 ------ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-remoting/dubbo-remoting-http/pom.xml | 4 +- .../src/test/resources/log4j.xml | 41 ------- .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-remoting/dubbo-remoting-netty/pom.xml | 4 +- .../src/test/resources/log4j.xml | 38 ------ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-remoting/dubbo-remoting-netty4/pom.xml | 4 +- .../src/test/resources/log4j.properties | 7 -- .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-rpc/dubbo-rpc-api/pom.xml | 4 +- .../src/test/resources/log4j.xml | 46 ------- .../src/test/resources/log4j2-test.xml | 33 +++++ dubbo-rpc/dubbo-rpc-dubbo/pom.xml | 4 +- .../src/test/resources/log4j.xml | 46 ------- .../src/test/resources/log4j2-test.xml | 33 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-rpc/dubbo-rpc-rest/pom.xml | 32 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-rpc/dubbo-rpc-triple/pom.xml | 4 +- .../src/test/resources/log4j.xml | 38 ------ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ .../dubbo-spring-boot-autoconfigure/pom.xml | 2 +- .../src/test/resources/log4j2-test.xml | 29 +++++ .../actuator/pom.xml | 6 +- .../src/test/resources/log4j2-test.xml | 29 +++++ .../autoconfigure/pom.xml | 2 +- .../src/test/resources/log4j2-test.xml | 29 +++++ .../pom.xml | 12 -- .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-spring-boot/pom.xml | 15 +-- dubbo-test/dubbo-test-check/pom.xml | 2 +- dubbo-test/dubbo-test-common/pom.xml | 4 + .../src/main/resources/log4j2-test.xml | 29 +++++ .../src/test/resources/log4j2-test.xml | 29 +++++ dubbo-test/dubbo-test-spring/pom.xml | 7 +- .../src/main/resources/log4j.properties | 7 -- dubbo-xds/src/test/resources/log4j2-test.xml | 29 +++++ pom.xml | 4 +- 181 files changed, 2911 insertions(+), 814 deletions(-) delete mode 100644 dubbo-cluster/src/test/resources/log4j.xml create mode 100644 dubbo-cluster/src/test/resources/log4j2-test.xml create mode 100644 dubbo-common/src/main/resources/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat delete mode 100644 dubbo-common/src/test/resources/log4j.xml create mode 100644 dubbo-common/src/test/resources/log4j2-test.xml create mode 100644 dubbo-compatible/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/log4j.xml delete mode 100644 dubbo-config/dubbo-config-spring/src/test/resources/log4j.xml create mode 100644 dubbo-configcenter/dubbo-configcenter-apollo/src/test/resources/log4j2-test.xml create mode 100644 dubbo-configcenter/dubbo-configcenter-file/src/test/resources/log4j2-test.xml create mode 100644 dubbo-configcenter/dubbo-configcenter-nacos/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-container/dubbo-container-spring/src/test/resources/log4j.xml create mode 100644 dubbo-container/dubbo-container-spring/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-generic-call/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-generic-call/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/resources/Log4j.properties create mode 100644 dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/resources/Log4j.properties create mode 100644 dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-triple/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-triple/src/main/resources/log4j2.xml create mode 100644 dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-consumer/src/main/resources/log4j2.xml create mode 100644 dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-provider/src/main/resources/log4j2.xml create mode 100644 dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-consumer/src/main/resources/log4j2.xml create mode 100644 dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-provider/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/src/main/resources/log4j2.xml delete mode 100644 dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/log4j.properties create mode 100644 dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/log4j2.xml create mode 100644 dubbo-kubernetes/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metadata/dubbo-metadata-api/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metadata/dubbo-metadata-definition-protobuf/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metadata/dubbo-metadata-processor/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metadata/dubbo-metadata-report-nacos/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metadata/dubbo-metadata-report-redis/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metadata/dubbo-metadata-rest/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metrics/dubbo-metrics-api/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metrics/dubbo-metrics-config-center/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metrics/dubbo-metrics-default/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metrics/dubbo-metrics-metadata/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metrics/dubbo-metrics-prometheus/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metrics/dubbo-metrics-registry/src/test/resources/log4j2-test.xml create mode 100644 dubbo-metrics/dubbo-tracing/src/test/resources/log4j2-test.xml create mode 100644 dubbo-monitor/dubbo-monitor-common/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-monitor/dubbo-monitor-default/src/test/resources/log4j.properties create mode 100644 dubbo-monitor/dubbo-monitor-default/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-auth/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-filter-cache/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-filter-validation/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-native/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j.xml create mode 100644 dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-classloader-filter/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-cluster-mergeable/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-context/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-generic-invoke/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-loadbalance-adaptive/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-loom/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-mock/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-proxy-bytebuddy/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-qos-trace/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-router-condition/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-router-mesh/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-router-script/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-router-tag/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-token/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-plugin-tps/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-qos/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-reactive/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-security/src/test/resources/log4j2-test.xml create mode 100644 dubbo-plugin/dubbo-spring-security/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-registry/dubbo-registry-api/src/test/resources/log4j.xml create mode 100644 dubbo-registry/dubbo-registry-api/src/test/resources/log4j2-test.xml create mode 100644 dubbo-registry/dubbo-registry-multicast/src/test/resources/log4j2-test.xml create mode 100644 dubbo-registry/dubbo-registry-nacos/src/test/resources/log4j2-test.xml create mode 100644 dubbo-registry/dubbo-registry-zookeeper/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-remoting/dubbo-remoting-api/src/test/resources/log4j.xml create mode 100644 dubbo-remoting/dubbo-remoting-api/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-remoting/dubbo-remoting-http/src/test/resources/log4j.xml create mode 100644 dubbo-remoting/dubbo-remoting-http/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j.xml create mode 100644 dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-remoting/dubbo-remoting-netty4/src/test/resources/log4j.properties create mode 100644 dubbo-remoting/dubbo-remoting-netty4/src/test/resources/log4j2-test.xml create mode 100644 dubbo-remoting/dubbo-remoting-zookeeper-curator5/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j.xml create mode 100644 dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j.xml create mode 100644 dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j2-test.xml create mode 100644 dubbo-rpc/dubbo-rpc-injvm/src/test/resources/log4j2-test.xml create mode 100644 dubbo-rpc/dubbo-rpc-rest/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-rpc/dubbo-rpc-triple/src/test/resources/log4j.xml create mode 100644 dubbo-rpc/dubbo-rpc-triple/src/test/resources/log4j2-test.xml create mode 100644 dubbo-serialization/dubbo-serialization-fastjson2/src/test/resources/log4j2-test.xml create mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/resources/log4j2-test.xml create mode 100644 dubbo-spring-boot/dubbo-spring-boot-actuator/src/test/resources/log4j2-test.xml create mode 100644 dubbo-spring-boot/dubbo-spring-boot-autoconfigure/src/test/resources/log4j2-test.xml create mode 100644 dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/src/test/resources/log4j2-test.xml create mode 100644 dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/resources/log4j2-test.xml create mode 100644 dubbo-spring-boot/dubbo-spring-boot-starters/observability/autoconfigure/src/test/resources/log4j2-test.xml create mode 100644 dubbo-test/dubbo-test-common/src/main/resources/log4j2-test.xml create mode 100644 dubbo-test/dubbo-test-modules/src/test/resources/log4j2-test.xml delete mode 100644 dubbo-test/dubbo-test-spring/src/main/resources/log4j.properties create mode 100644 dubbo-xds/src/test/resources/log4j2-test.xml diff --git a/dubbo-cluster/pom.xml b/dubbo-cluster/pom.xml index 093999874143..f5136d52cfe1 100644 --- a/dubbo-cluster/pom.xml +++ b/dubbo-cluster/pom.xml @@ -93,8 +93,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/support/FailbackClusterInvokerTest.java b/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/support/FailbackClusterInvokerTest.java index 413cc9615d08..63dbe8936846 100644 --- a/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/support/FailbackClusterInvokerTest.java +++ b/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/support/FailbackClusterInvokerTest.java @@ -18,6 +18,7 @@ import org.apache.dubbo.common.URL; import org.apache.dubbo.common.constants.CommonConstants; +import org.apache.dubbo.common.logger.Level; import org.apache.dubbo.common.utils.DubboAppender; import org.apache.dubbo.common.utils.LogUtil; import org.apache.dubbo.rpc.AppResponse; @@ -34,7 +35,6 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.log4j.Level; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; diff --git a/dubbo-cluster/src/test/resources/log4j.xml b/dubbo-cluster/src/test/resources/log4j.xml deleted file mode 100644 index 7a8fc9e55b34..000000000000 --- a/dubbo-cluster/src/test/resources/log4j.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dubbo-cluster/src/test/resources/log4j2-test.xml b/dubbo-cluster/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..7a2ba1e5f474 --- /dev/null +++ b/dubbo-cluster/src/test/resources/log4j2-test.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + diff --git a/dubbo-common/pom.xml b/dubbo-common/pom.xml index 8f418e1a4f28..476f08bc94b4 100644 --- a/dubbo-common/pom.xml +++ b/dubbo-common/pom.xml @@ -106,8 +106,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/DubboAppender.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/DubboAppender.java index f9ac324c67c1..87189f0a3cf2 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/DubboAppender.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/DubboAppender.java @@ -16,24 +16,91 @@ */ package org.apache.dubbo.common.utils; +import org.apache.dubbo.common.logger.Level; + import java.util.ArrayList; import java.util.List; -import org.apache.log4j.FileAppender; -import org.apache.log4j.spi.LoggingEvent; +import org.apache.logging.log4j.core.LogEvent; +import org.apache.logging.log4j.core.appender.AbstractAppender; +import org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender; +import org.apache.logging.log4j.core.appender.FileAppender; +import org.apache.logging.log4j.core.config.Property; +import org.apache.logging.log4j.core.config.plugins.Plugin; +import org.apache.logging.log4j.core.config.plugins.PluginBuilderAttribute; +import org.apache.logging.log4j.core.config.plugins.PluginBuilderFactory; + +@Plugin(name = "Dubbo", category = "Core", elementType = "appender") +public class DubboAppender extends AbstractAppender { + + public static class Builder extends AbstractOutputStreamAppender.Builder + implements org.apache.logging.log4j.core.util.Builder { + + @PluginBuilderAttribute + private String fileName; + + @PluginBuilderAttribute + private boolean append = true; -public class DubboAppender extends FileAppender { + @PluginBuilderAttribute + private boolean locking; + + public Builder setFileName(String fileName) { + this.fileName = fileName; + return this; + } + + public Builder setAppend(boolean append) { + this.append = append; + return this; + } + + public Builder setLocking(boolean locking) { + this.locking = locking; + return this; + } + + @Override + public DubboAppender build() { + return new DubboAppender(getName(), buildFileAppender()); + } + + private > FileAppender buildFileAppender() { + FileAppender.Builder builder = FileAppender.newBuilder(); + builder.setIgnoreExceptions(isIgnoreExceptions()); + builder.setLayout(getLayout()); + builder.setName(getName() + "-File"); + builder.setConfiguration(getConfiguration()); + builder.setBufferedIo(isBufferedIo()); + builder.setBufferSize(getBufferSize()); + builder.setImmediateFlush(isImmediateFlush()); + builder.withFileName(fileName == null || fileName.isEmpty() ? DEFAULT_FILE_NAME : fileName); + builder.withAppend(append); + builder.withLocking(locking); + return builder.build(); + } + } private static final String DEFAULT_FILE_NAME = "dubbo.log"; + public static boolean available = false; + public static List logList = new ArrayList<>(); + + private final FileAppender fileAppender; + public DubboAppender() { - super(); - setFile(DEFAULT_FILE_NAME); + this("Dubbo", null); } - public static boolean available = false; + private DubboAppender(String name, FileAppender fileAppender) { + super(name, null, null, true, Property.EMPTY_ARRAY); + this.fileAppender = fileAppender; + } - public static List logList = new ArrayList<>(); + @PluginBuilderFactory + public static Builder newBuilder() { + return new Builder().asBuilder(); + } public static void doStart() { available = true; @@ -48,20 +115,39 @@ public static void clear() { } @Override - public void append(LoggingEvent event) { - super.append(event); + public void append(LogEvent event) { + if (fileAppender != null) { + fileAppender.append(event); + } if (available) { - Log temp = parseLog(event); - logList.add(temp); + logList.add(parseLog(event)); } } - private Log parseLog(LoggingEvent event) { + @Override + public void initialize() { + fileAppender.initialize(); + super.initialize(); + } + + @Override + public void start() { + fileAppender.start(); + super.start(); + } + + @Override + public void stop() { + super.stop(); + fileAppender.stop(); + } + + private Log parseLog(LogEvent event) { Log log = new Log(); - log.setLogName(event.getLogger().getName()); - log.setLogLevel(event.getLevel()); + log.setLogName(event.getLoggerName()); + log.setLogLevel(Level.valueOf(event.getLevel().name())); log.setLogThread(event.getThreadName()); - log.setLogMessage(event.getMessage().toString()); + log.setLogMessage(event.getMessage().getFormattedMessage()); return log; } } diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/Log.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/Log.java index 3943b67687dc..eac9df05e11f 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/Log.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/Log.java @@ -16,9 +16,9 @@ */ package org.apache.dubbo.common.utils; -import java.io.Serializable; +import org.apache.dubbo.common.logger.Level; -import org.apache.log4j.Level; +import java.io.Serializable; public class Log implements Serializable { private static final long serialVersionUID = -534113138054377073L; diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/LogUtil.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/LogUtil.java index 5319206663d1..846b93f11c70 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/LogUtil.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/LogUtil.java @@ -16,14 +16,13 @@ */ package org.apache.dubbo.common.utils; +import org.apache.dubbo.common.logger.Level; import org.apache.dubbo.common.logger.Logger; import org.apache.dubbo.common.logger.LoggerFactory; import java.util.Iterator; import java.util.List; -import org.apache.log4j.Level; - public class LogUtil { private static final Logger Log = LoggerFactory.getLogger(LogUtil.class); diff --git a/dubbo-common/src/main/resources/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat b/dubbo-common/src/main/resources/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat new file mode 100644 index 0000000000000000000000000000000000000000..e2db441abb6c9f94ee0ee10455e7b59b2554e1e6 GIT binary patch literal 78 zcmZQzU|?imNzN}yWdN~QQ%aMP@)@-Ai_-NH3lftvQuV+hddc~@x%qi|r6rj;#dMGPE?Fct# - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dubbo-common/src/test/resources/log4j2-test.xml b/dubbo-common/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-common/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-compatible/pom.xml b/dubbo-compatible/pom.xml index aaf41f29defa..314b4fd8f656 100644 --- a/dubbo-compatible/pom.xml +++ b/dubbo-compatible/pom.xml @@ -64,10 +64,15 @@ ${project.parent.version} - org.slf4j - slf4j-log4j12 + log4j + log4j true + + org.apache.logging.log4j + log4j-slf4j-impl + test + org.apache.dubbo dubbo-serialization-hessian2 diff --git a/dubbo-compatible/src/test/resources/log4j2-test.xml b/dubbo-compatible/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-compatible/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-config/dubbo-config-api/pom.xml b/dubbo-config/dubbo-config-api/pom.xml index 0d676105246e..cf2971ac8e0c 100644 --- a/dubbo-config/dubbo-config-api/pom.xml +++ b/dubbo-config/dubbo-config-api/pom.xml @@ -171,8 +171,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-config/dubbo-config-api/src/test/resources/log4j.xml b/dubbo-config/dubbo-config-api/src/test/resources/log4j.xml deleted file mode 100644 index bfc37a80842c..000000000000 --- a/dubbo-config/dubbo-config-api/src/test/resources/log4j.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/dubbo-config/dubbo-config-spring/pom.xml b/dubbo-config/dubbo-config-spring/pom.xml index dc82f99145ce..6fe4d6f538e7 100644 --- a/dubbo-config/dubbo-config-spring/pom.xml +++ b/dubbo-config/dubbo-config-spring/pom.xml @@ -209,8 +209,8 @@ - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-config/dubbo-config-spring/src/test/resources/log4j.xml b/dubbo-config/dubbo-config-spring/src/test/resources/log4j.xml deleted file mode 100644 index 723821df246b..000000000000 --- a/dubbo-config/dubbo-config-spring/src/test/resources/log4j.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/dubbo-config/dubbo-config-spring6/pom.xml b/dubbo-config/dubbo-config-spring6/pom.xml index 3f067b3dfd0d..ec4461ae4633 100644 --- a/dubbo-config/dubbo-config-spring6/pom.xml +++ b/dubbo-config/dubbo-config-spring6/pom.xml @@ -88,8 +88,8 @@ - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-configcenter/dubbo-configcenter-apollo/src/test/resources/log4j2-test.xml b/dubbo-configcenter/dubbo-configcenter-apollo/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-configcenter/dubbo-configcenter-apollo/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-configcenter/dubbo-configcenter-file/src/test/resources/log4j2-test.xml b/dubbo-configcenter/dubbo-configcenter-file/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-configcenter/dubbo-configcenter-file/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-configcenter/dubbo-configcenter-nacos/src/test/resources/log4j2-test.xml b/dubbo-configcenter/dubbo-configcenter-nacos/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-configcenter/dubbo-configcenter-nacos/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-container/dubbo-container-spring/pom.xml b/dubbo-container/dubbo-container-spring/pom.xml index 44fc43d51fa1..9b056ef11638 100644 --- a/dubbo-container/dubbo-container-spring/pom.xml +++ b/dubbo-container/dubbo-container-spring/pom.xml @@ -41,8 +41,8 @@ spring-context - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-container/dubbo-container-spring/src/test/resources/log4j.xml b/dubbo-container/dubbo-container-spring/src/test/resources/log4j.xml deleted file mode 100644 index 6bf9bd85ff3c..000000000000 --- a/dubbo-container/dubbo-container-spring/src/test/resources/log4j.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/dubbo-container/dubbo-container-spring/src/test/resources/log4j2-test.xml b/dubbo-container/dubbo-container-spring/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-container/dubbo-container-spring/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/pom.xml b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/pom.xml index d8e0fe734ddb..b66dadc983bf 100644 --- a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/pom.xml @@ -102,6 +102,10 @@ dubbo-serialization-fastjson2 ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/src/main/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/pom.xml b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/pom.xml index 0b87bfe3a846..720724073b0a 100644 --- a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/pom.xml @@ -102,6 +102,10 @@ dubbo-serialization-fastjson2 ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/src/main/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-provider/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/pom.xml b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/pom.xml index 13d779b99fbc..ff2b42a3feac 100644 --- a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/pom.xml @@ -103,6 +103,10 @@ dubbo-plugin-cluster-mergeable ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/src/main/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/pom.xml b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/pom.xml index d29f723f700c..c29e4ababfb2 100644 --- a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/pom.xml @@ -98,5 +98,9 @@ dubbo-serialization-fastjson2 ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-generic-call/pom.xml b/dubbo-demo/dubbo-demo-generic-call/pom.xml index 53925c9f3694..85e74c5f3ae6 100644 --- a/dubbo-demo/dubbo-demo-generic-call/pom.xml +++ b/dubbo-demo/dubbo-demo-generic-call/pom.xml @@ -97,6 +97,9 @@ dubbo-serialization-fastjson2 ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + - diff --git a/dubbo-demo/dubbo-demo-generic-call/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-generic-call/src/main/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-demo/dubbo-demo-generic-call/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-generic-call/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-generic-call/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-generic-call/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-interface/pom.xml b/dubbo-demo/dubbo-demo-interface/pom.xml index 6641c3ce6563..c01cd37eb7dc 100644 --- a/dubbo-demo/dubbo-demo-interface/pom.xml +++ b/dubbo-demo/dubbo-demo-interface/pom.xml @@ -50,5 +50,10 @@ org.springframework spring-web + + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml index 6892e2771453..d3fa87d9ad57 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml @@ -145,6 +145,10 @@ dubbo-native ${project.version} + + ch.qos.logback + logback-classic + @@ -186,7 +190,6 @@ - org.graalvm.buildtools native-maven-plugin diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/java/org/apache/dubbo/demo/graalvm/consumer/Application.java b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/java/org/apache/dubbo/demo/graalvm/consumer/Application.java index 77d77635f2b4..4eab6bfa3bbc 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/java/org/apache/dubbo/demo/graalvm/consumer/Application.java +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/java/org/apache/dubbo/demo/graalvm/consumer/Application.java @@ -32,7 +32,7 @@ public class Application { private static final String REGISTRY_URL = "zookeeper://127.0.0.1:2181"; public static void main(String[] args) { - System.setProperty("dubbo.application.logger", "log4j"); + System.setProperty("dubbo.application.logger", "logback"); System.setProperty("native", "true"); System.setProperty("dubbo.json-framework.prefer", "fastjson"); runWithBootstrap(); diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/resources/Log4j.properties b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/resources/Log4j.properties deleted file mode 100644 index dc3923d6e39d..000000000000 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/resources/Log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -log4j.rootLogger=error, console - -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=[%-12d{HH\:mm\:ss.SS}] [%p] %l %m%n diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml index 88a5d115adba..ddfd3cc7cab8 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml @@ -118,6 +118,7 @@ dubbo-serialization-fastjson2 ${project.version} + org.apache.dubbo dubbo-filter-cache @@ -133,15 +134,21 @@ dubbo-remoting-http ${project.version} + com.alibaba fastjson + org.apache.dubbo dubbo-native ${project.version} + + ch.qos.logback + logback-classic + @@ -150,7 +157,6 @@ native - diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/java/org/apache/dubbo/demo/graalvm/provider/Application.java b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/java/org/apache/dubbo/demo/graalvm/provider/Application.java index bfe638da2fee..4fae55cd36c8 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/java/org/apache/dubbo/demo/graalvm/provider/Application.java +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/java/org/apache/dubbo/demo/graalvm/provider/Application.java @@ -32,7 +32,7 @@ public class Application { private static final String REGISTRY_URL = "zookeeper://127.0.0.1:2181"; public static void main(String[] args) throws Exception { - System.setProperty("dubbo.application.logger", "log4j"); + System.setProperty("dubbo.application.logger", "logback"); System.setProperty("native", "true"); System.setProperty("dubbo.json-framework.prefer", "fastjson"); startWithBootstrap(); diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/resources/Log4j.properties b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/resources/Log4j.properties deleted file mode 100644 index 192673cfecc7..000000000000 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/resources/Log4j.properties +++ /dev/null @@ -1,27 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - - -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/pom.xml b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/pom.xml index a1771060af88..9179bd6ff6c9 100644 --- a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/pom.xml @@ -37,12 +37,6 @@ ${project.parent.version} - - org.apache.dubbo - dubbo-spring-boot-starter - ${project.version} - - org.apache.dubbo dubbo-registry-zookeeper @@ -85,23 +79,34 @@ ${project.version} + - org.springframework.boot - spring-boot-starter - ${spring-boot.version} + org.apache.dubbo + dubbo-tracing-otel-zipkin-spring-boot-starter + ${project.version} org.apache.dubbo - dubbo-tracing-otel-zipkin-spring-boot-starter + dubbo-qos ${project.version} org.apache.dubbo - dubbo-qos + dubbo-spring-boot-starter ${project.version} + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-log4j2 + @@ -120,4 +125,5 @@ + diff --git a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/src/main/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-consumer/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/pom.xml b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/pom.xml index 6dd76b05c49f..a14a0199b869 100644 --- a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/pom.xml @@ -92,10 +92,21 @@ ${project.version} + + org.apache.dubbo + dubbo-spring-boot-starter + ${project.version} + + org.springframework.boot spring-boot-starter + + + org.springframework.boot + spring-boot-starter-log4j2 + diff --git a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/src/main/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-provider/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-spring-boot/pom.xml b/dubbo-demo/dubbo-demo-spring-boot/pom.xml index 086bf44d20a3..283359888989 100644 --- a/dubbo-demo/dubbo-demo-spring-boot/pom.xml +++ b/dubbo-demo/dubbo-demo-spring-boot/pom.xml @@ -34,7 +34,6 @@ true 2.7.17 - 1.7.33 2.7.17 1.11.5 @@ -50,24 +49,15 @@ org.springframework.boot - spring-boot-starter-logging + spring-boot-starter ${spring-boot.version} - ch.qos.logback - logback-classic - - - org.apache.logging.log4j - log4j-to-slf4j + org.springframework.boot + spring-boot-starter-logging - - org.slf4j - slf4j-log4j12 - ${slf4j-log4j12_version} - io.micrometer micrometer-core diff --git a/dubbo-demo/dubbo-demo-triple/pom.xml b/dubbo-demo/dubbo-demo-triple/pom.xml index dc200cc7841c..81b92aae67c2 100644 --- a/dubbo-demo/dubbo-demo-triple/pom.xml +++ b/dubbo-demo/dubbo-demo-triple/pom.xml @@ -126,6 +126,10 @@ com.google.protobuf protobuf-java + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-triple/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-triple/src/main/resources/log4j.properties deleted file mode 100644 index 3fa75995b9f5..000000000000 --- a/dubbo-demo/dubbo-demo-triple/src/main/resources/log4j.properties +++ /dev/null @@ -1,26 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -###set log levels### -log4j.rootLogger=debug, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-triple/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-triple/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-triple/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-consumer/pom.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-consumer/pom.xml index 7f56bf8c8401..e3d58536b823 100644 --- a/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-consumer/pom.xml @@ -130,6 +130,10 @@ dubbo-demo-interface ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-consumer/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-consumer/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-consumer/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-provider/pom.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-provider/pom.xml index 65b2e28d17c5..afd7d330bf51 100644 --- a/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-provider/pom.xml @@ -130,6 +130,10 @@ dubbo-demo-interface ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-provider/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-provider/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-jaxrs-rest-provider/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-consumer/pom.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-consumer/pom.xml index d9ce547acb18..dc750c333de5 100644 --- a/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-consumer/pom.xml @@ -130,6 +130,10 @@ dubbo-demo-interface ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-consumer/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-consumer/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-consumer/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-provider/pom.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-provider/pom.xml index 4a4a98a21648..80d5cc72be90 100644 --- a/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-provider/pom.xml @@ -130,6 +130,10 @@ dubbo-demo-interface ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-provider/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-provider/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-spring-mvc-rest-provider/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/pom.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/pom.xml index 4060ae76c582..25a3ee5e5313 100644 --- a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/pom.xml @@ -110,5 +110,9 @@ dubbo-rpc-triple ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/src/main/resources/log4j.properties deleted file mode 100644 index a92647d964c9..000000000000 --- a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-consumer/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/pom.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/pom.xml index 86fa7f498cd3..b3402d30bc0f 100644 --- a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/pom.xml @@ -122,5 +122,9 @@ dubbo-qos ${project.version} + + org.apache.logging.log4j + log4j-slf4j-impl + diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/log4j.properties b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-demo/pom.xml b/dubbo-demo/pom.xml index fea5b042e785..30b2a1e5dc8c 100644 --- a/dubbo-demo/pom.xml +++ b/dubbo-demo/pom.xml @@ -42,11 +42,4 @@ true - - - - org.slf4j - slf4j-log4j12 - - diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 0c2a0fe519d2..ff0be177aaed 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -102,7 +102,7 @@ 4.4.16 1.2.83 2.0.42 - 3.7.0 + 3.7.2 5.1.0 2.12.0 3.10.0 @@ -157,8 +157,6 @@ 0.9.10 1.7.36 - - 1.7.33 1.2 1.2.17 1.2.11 @@ -319,7 +317,7 @@ org.slf4j - slf4j-log4j12 + log4j-slf4j-impl log4j @@ -333,6 +331,10 @@ ch.qos.logback logback-classic + + org.slf4j + slf4j-log4j12 + org.apache.yetus audience-annotations @@ -648,11 +650,6 @@ slf4j-api ${slf4j_version} - - org.slf4j - slf4j-log4j12 - ${slf4j-log4j12_version} - commons-logging commons-logging @@ -688,6 +685,16 @@ log4j-core ${log4j2_version} + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j2_version} + + + org.apache.logging.log4j + log4j-slf4j2-impl + ${log4j2_version} + com.ctrip.framework.apollo apollo-client @@ -1063,6 +1070,7 @@ flatten-maven-plugin ${maven_flatten_version} + target true bom diff --git a/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml b/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml index 12e64cfaa8e5..e56bc66836cb 100644 --- a/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml +++ b/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml @@ -35,25 +35,13 @@ 1.5.0 1.7.36 5.1.0 - 3.8.1 + 3.8.3 2.40.0 check 1.0.0 2.38.0 - - - - org.apache.zookeeper - parent - ${zookeeper_version} - pom - import - - - - org.apache.curator @@ -119,6 +107,7 @@ flatten-maven-plugin ${maven_flatten_version} + target true oss diff --git a/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml b/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml index cca065cfd5ad..7b2655fbb0eb 100644 --- a/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml +++ b/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml @@ -111,6 +111,7 @@ flatten-maven-plugin ${maven_flatten_version} + target true oss diff --git a/dubbo-dependencies/pom.xml b/dubbo-dependencies/pom.xml index 441adfdb68db..c5d01ad3848d 100644 --- a/dubbo-dependencies/pom.xml +++ b/dubbo-dependencies/pom.xml @@ -45,6 +45,7 @@ flatten-maven-plugin ${maven_flatten_version} + target true bom diff --git a/dubbo-kubernetes/src/test/resources/log4j2-test.xml b/dubbo-kubernetes/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-kubernetes/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metadata/dubbo-metadata-api/src/test/resources/log4j2-test.xml b/dubbo-metadata/dubbo-metadata-api/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metadata/dubbo-metadata-api/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metadata/dubbo-metadata-definition-protobuf/src/test/resources/log4j2-test.xml b/dubbo-metadata/dubbo-metadata-definition-protobuf/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metadata/dubbo-metadata-definition-protobuf/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metadata/dubbo-metadata-processor/src/test/resources/log4j2-test.xml b/dubbo-metadata/dubbo-metadata-processor/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metadata/dubbo-metadata-processor/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metadata/dubbo-metadata-report-nacos/src/test/resources/log4j2-test.xml b/dubbo-metadata/dubbo-metadata-report-nacos/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metadata/dubbo-metadata-report-nacos/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metadata/dubbo-metadata-report-redis/src/test/resources/log4j2-test.xml b/dubbo-metadata/dubbo-metadata-report-redis/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metadata/dubbo-metadata-report-redis/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metadata/dubbo-metadata-rest/pom.xml b/dubbo-metadata/dubbo-metadata-rest/pom.xml index dfb0b3cffc18..8df334033a45 100644 --- a/dubbo-metadata/dubbo-metadata-rest/pom.xml +++ b/dubbo-metadata/dubbo-metadata-rest/pom.xml @@ -30,6 +30,33 @@ dubbo-metadata-rest The rest metadata module of Dubbo project + + 2.7.17 + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.boot + spring-boot-starter + ${spring-boot.version} + + + org.springframework.boot + spring-boot-starter-logging + + + + + + org.apache.dubbo @@ -63,6 +90,12 @@ spring-cloud-openfeign-core test + + + org.springframework.boot + spring-boot-starter-log4j2 + test + diff --git a/dubbo-metadata/dubbo-metadata-rest/src/test/resources/log4j2-test.xml b/dubbo-metadata/dubbo-metadata-rest/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metadata/dubbo-metadata-rest/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metrics/dubbo-metrics-api/src/test/resources/log4j2-test.xml b/dubbo-metrics/dubbo-metrics-api/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metrics/dubbo-metrics-api/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metrics/dubbo-metrics-config-center/src/test/resources/log4j2-test.xml b/dubbo-metrics/dubbo-metrics-config-center/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metrics/dubbo-metrics-config-center/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metrics/dubbo-metrics-default/src/test/resources/log4j2-test.xml b/dubbo-metrics/dubbo-metrics-default/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metrics/dubbo-metrics-default/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metrics/dubbo-metrics-metadata/src/test/resources/log4j2-test.xml b/dubbo-metrics/dubbo-metrics-metadata/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metrics/dubbo-metrics-metadata/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metrics/dubbo-metrics-prometheus/src/test/resources/log4j2-test.xml b/dubbo-metrics/dubbo-metrics-prometheus/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metrics/dubbo-metrics-prometheus/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metrics/dubbo-metrics-registry/src/test/resources/log4j2-test.xml b/dubbo-metrics/dubbo-metrics-registry/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metrics/dubbo-metrics-registry/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metrics/dubbo-tracing/src/test/resources/log4j2-test.xml b/dubbo-metrics/dubbo-tracing/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-metrics/dubbo-tracing/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-monitor/dubbo-monitor-common/src/test/resources/log4j2-test.xml b/dubbo-monitor/dubbo-monitor-common/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-monitor/dubbo-monitor-common/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-monitor/dubbo-monitor-default/pom.xml b/dubbo-monitor/dubbo-monitor-default/pom.xml index b2de57b61b98..76b9a381913a 100644 --- a/dubbo-monitor/dubbo-monitor-default/pom.xml +++ b/dubbo-monitor/dubbo-monitor-default/pom.xml @@ -78,8 +78,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-monitor/dubbo-monitor-default/src/test/resources/log4j.properties b/dubbo-monitor/dubbo-monitor-default/src/test/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-monitor/dubbo-monitor-default/src/test/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-monitor/dubbo-monitor-default/src/test/resources/log4j2-test.xml b/dubbo-monitor/dubbo-monitor-default/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-monitor/dubbo-monitor-default/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-auth/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-auth/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-auth/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-filter-cache/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-filter-cache/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-filter-cache/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-filter-validation/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-filter-validation/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-filter-validation/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-native/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-native/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-native/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-access-log/pom.xml b/dubbo-plugin/dubbo-plugin-access-log/pom.xml index c295f23aff4f..b3dd64cf43c4 100644 --- a/dubbo-plugin/dubbo-plugin-access-log/pom.xml +++ b/dubbo-plugin/dubbo-plugin-access-log/pom.xml @@ -38,5 +38,10 @@ dubbo-config-api ${project.version} + + log4j + log4j + test + diff --git a/dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j.xml b/dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j.xml deleted file mode 100644 index eb01deaffe9d..000000000000 --- a/dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-classloader-filter/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-classloader-filter/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-classloader-filter/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-cluster-mergeable/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-cluster-mergeable/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-cluster-mergeable/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-context/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-context/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-context/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-generic-invoke/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-generic-invoke/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-generic-invoke/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-loadbalance-adaptive/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-loadbalance-adaptive/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-loadbalance-adaptive/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-loom/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-loom/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-loom/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-mock/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-mock/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-mock/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-proxy-bytebuddy/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-proxy-bytebuddy/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-proxy-bytebuddy/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-qos-trace/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-qos-trace/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-qos-trace/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-router-condition/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-router-condition/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-router-condition/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-router-mesh/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-router-mesh/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-router-mesh/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-router-script/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-router-script/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-router-script/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-router-tag/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-router-tag/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-router-tag/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-token/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-token/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-token/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-plugin-tps/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-plugin-tps/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-plugin-tps/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-qos/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-qos/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-qos/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-reactive/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-reactive/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-reactive/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-security/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-security/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-security/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/dubbo-spring-security/src/test/resources/log4j2-test.xml b/dubbo-plugin/dubbo-spring-security/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-plugin/dubbo-spring-security/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-plugin/pom.xml b/dubbo-plugin/pom.xml index ed36a4808336..924cdd1e4654 100644 --- a/dubbo-plugin/pom.xml +++ b/dubbo-plugin/pom.xml @@ -68,8 +68,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-registry/dubbo-registry-api/pom.xml b/dubbo-registry/dubbo-registry-api/pom.xml index 244db28d0a60..fb06e5958bc8 100644 --- a/dubbo-registry/dubbo-registry-api/pom.xml +++ b/dubbo-registry/dubbo-registry-api/pom.xml @@ -118,10 +118,9 @@ ${project.parent.version} test - - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-registry/dubbo-registry-api/src/test/java/org/apache/dubbo/registry/client/metadata/store/MetaCacheManagerTest.java b/dubbo-registry/dubbo-registry-api/src/test/java/org/apache/dubbo/registry/client/metadata/store/MetaCacheManagerTest.java index cd1d5312cf1a..33e142b62493 100644 --- a/dubbo-registry/dubbo-registry-api/src/test/java/org/apache/dubbo/registry/client/metadata/store/MetaCacheManagerTest.java +++ b/dubbo-registry/dubbo-registry-api/src/test/java/org/apache/dubbo/registry/client/metadata/store/MetaCacheManagerTest.java @@ -121,9 +121,9 @@ void testCacheDump() { } private String getDirectoryOfClassPath() throws URISyntaxException { - URL resource = this.getClass().getResource("/log4j.xml"); + URL resource = this.getClass().getResource("/log4j2-test.xml"); String path = Paths.get(resource.toURI()).toFile().getAbsolutePath(); - int index = path.indexOf("log4j.xml"); + int index = path.indexOf("log4j2-test.xml"); String directoryPath = path.substring(0, index); return directoryPath; } diff --git a/dubbo-registry/dubbo-registry-api/src/test/resources/log4j.xml b/dubbo-registry/dubbo-registry-api/src/test/resources/log4j.xml deleted file mode 100644 index 3a4fc863c784..000000000000 --- a/dubbo-registry/dubbo-registry-api/src/test/resources/log4j.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - diff --git a/dubbo-registry/dubbo-registry-api/src/test/resources/log4j2-test.xml b/dubbo-registry/dubbo-registry-api/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-registry/dubbo-registry-api/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-registry/dubbo-registry-multicast/src/test/resources/log4j2-test.xml b/dubbo-registry/dubbo-registry-multicast/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-registry/dubbo-registry-multicast/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-registry/dubbo-registry-nacos/pom.xml b/dubbo-registry/dubbo-registry-nacos/pom.xml index 6c7e7760435f..76a6cfe8c301 100644 --- a/dubbo-registry/dubbo-registry-nacos/pom.xml +++ b/dubbo-registry/dubbo-registry-nacos/pom.xml @@ -75,8 +75,8 @@ - ch.qos.logback - logback-classic + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-registry/dubbo-registry-nacos/src/test/resources/log4j2-test.xml b/dubbo-registry/dubbo-registry-nacos/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-registry/dubbo-registry-nacos/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-registry/dubbo-registry-zookeeper/src/test/resources/log4j2-test.xml b/dubbo-registry/dubbo-registry-zookeeper/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-registry/dubbo-registry-zookeeper/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-remoting/dubbo-remoting-api/pom.xml b/dubbo-remoting/dubbo-remoting-api/pom.xml index a7c838e90099..73e160136e72 100644 --- a/dubbo-remoting/dubbo-remoting-api/pom.xml +++ b/dubbo-remoting/dubbo-remoting-api/pom.xml @@ -54,8 +54,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-remoting/dubbo-remoting-api/src/test/resources/log4j.xml b/dubbo-remoting/dubbo-remoting-api/src/test/resources/log4j.xml deleted file mode 100644 index 786c2732f28b..000000000000 --- a/dubbo-remoting/dubbo-remoting-api/src/test/resources/log4j.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/dubbo-remoting/dubbo-remoting-api/src/test/resources/log4j2-test.xml b/dubbo-remoting/dubbo-remoting-api/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-remoting/dubbo-remoting-api/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-remoting/dubbo-remoting-http/pom.xml b/dubbo-remoting/dubbo-remoting-http/pom.xml index e4af576a47c7..91834389bb31 100644 --- a/dubbo-remoting/dubbo-remoting-http/pom.xml +++ b/dubbo-remoting/dubbo-remoting-http/pom.xml @@ -60,8 +60,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-remoting/dubbo-remoting-http/src/test/resources/log4j.xml b/dubbo-remoting/dubbo-remoting-http/src/test/resources/log4j.xml deleted file mode 100644 index ef26f07ab1d6..000000000000 --- a/dubbo-remoting/dubbo-remoting-http/src/test/resources/log4j.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dubbo-remoting/dubbo-remoting-http/src/test/resources/log4j2-test.xml b/dubbo-remoting/dubbo-remoting-http/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-remoting/dubbo-remoting-http/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-remoting/dubbo-remoting-netty/pom.xml b/dubbo-remoting/dubbo-remoting-netty/pom.xml index 300e15c07fbf..94f3924efa7c 100644 --- a/dubbo-remoting/dubbo-remoting-netty/pom.xml +++ b/dubbo-remoting/dubbo-remoting-netty/pom.xml @@ -41,8 +41,8 @@ netty - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j.xml b/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j.xml deleted file mode 100644 index e0eda90175db..000000000000 --- a/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j2-test.xml b/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-remoting/dubbo-remoting-netty4/pom.xml b/dubbo-remoting/dubbo-remoting-netty4/pom.xml index 02d3e9747e5c..ec180ddb3fb1 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/pom.xml +++ b/dubbo-remoting/dubbo-remoting-netty4/pom.xml @@ -69,8 +69,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/test/resources/log4j.properties b/dubbo-remoting/dubbo-remoting-netty4/src/test/resources/log4j.properties deleted file mode 100644 index 6793e10f8264..000000000000 --- a/dubbo-remoting/dubbo-remoting-netty4/src/test/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=debug, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/test/resources/log4j2-test.xml b/dubbo-remoting/dubbo-remoting-netty4/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-remoting/dubbo-remoting-netty4/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-remoting/dubbo-remoting-zookeeper-curator5/src/test/resources/log4j2-test.xml b/dubbo-remoting/dubbo-remoting-zookeeper-curator5/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-remoting/dubbo-remoting-zookeeper-curator5/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-rpc/dubbo-rpc-api/pom.xml b/dubbo-rpc/dubbo-rpc-api/pom.xml index 93c0f77cbcc2..40d072ed2699 100644 --- a/dubbo-rpc/dubbo-rpc-api/pom.xml +++ b/dubbo-rpc/dubbo-rpc-api/pom.xml @@ -52,8 +52,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j.xml b/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j.xml deleted file mode 100644 index eb01deaffe9d..000000000000 --- a/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j2-test.xml b/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..eeb4d748f85c --- /dev/null +++ b/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j2-test.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + diff --git a/dubbo-rpc/dubbo-rpc-dubbo/pom.xml b/dubbo-rpc/dubbo-rpc-dubbo/pom.xml index 8d450d04cc80..660a701ea1b2 100644 --- a/dubbo-rpc/dubbo-rpc-dubbo/pom.xml +++ b/dubbo-rpc/dubbo-rpc-dubbo/pom.xml @@ -92,8 +92,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j.xml b/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j.xml deleted file mode 100644 index 4d4f4b696998..000000000000 --- a/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j2-test.xml b/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0ae2cfa0bfa3 --- /dev/null +++ b/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j2-test.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + diff --git a/dubbo-rpc/dubbo-rpc-injvm/src/test/resources/log4j2-test.xml b/dubbo-rpc/dubbo-rpc-injvm/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-rpc/dubbo-rpc-injvm/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-rpc/dubbo-rpc-rest/pom.xml b/dubbo-rpc/dubbo-rpc-rest/pom.xml index 88c8e4cf0884..ec247f8cd9fc 100644 --- a/dubbo-rpc/dubbo-rpc-rest/pom.xml +++ b/dubbo-rpc/dubbo-rpc-rest/pom.xml @@ -27,9 +27,35 @@ jar ${project.artifactId} The rest rpc module of dubbo project + + 2.7.17 false + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + org.springframework.boot + spring-boot-starter + ${spring-boot.version} + + + org.springframework.boot + spring-boot-starter-logging + + + + + + org.apache.dubbo @@ -166,5 +192,11 @@ spring-cloud-openfeign-core test + + + org.springframework.boot + spring-boot-starter-log4j2 + test + diff --git a/dubbo-rpc/dubbo-rpc-rest/src/test/resources/log4j2-test.xml b/dubbo-rpc/dubbo-rpc-rest/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-rpc/dubbo-rpc-rest/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-rpc/dubbo-rpc-triple/pom.xml b/dubbo-rpc/dubbo-rpc-triple/pom.xml index 7d52a6682a0a..bbaa7edd6849 100644 --- a/dubbo-rpc/dubbo-rpc-triple/pom.xml +++ b/dubbo-rpc/dubbo-rpc-triple/pom.xml @@ -73,8 +73,8 @@ test - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-rpc/dubbo-rpc-triple/src/test/resources/log4j.xml b/dubbo-rpc/dubbo-rpc-triple/src/test/resources/log4j.xml deleted file mode 100644 index ad745c5a726e..000000000000 --- a/dubbo-rpc/dubbo-rpc-triple/src/test/resources/log4j.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/dubbo-rpc/dubbo-rpc-triple/src/test/resources/log4j2-test.xml b/dubbo-rpc/dubbo-rpc-triple/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-rpc/dubbo-rpc-triple/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-serialization/dubbo-serialization-fastjson2/src/test/resources/log4j2-test.xml b/dubbo-serialization/dubbo-serialization-fastjson2/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-serialization/dubbo-serialization-fastjson2/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-serialization/dubbo-serialization-hessian2/src/test/resources/log4j2-test.xml b/dubbo-serialization/dubbo-serialization-hessian2/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-serialization/dubbo-serialization-hessian2/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-spring-boot/dubbo-spring-boot-actuator/src/test/resources/log4j2-test.xml b/dubbo-spring-boot/dubbo-spring-boot-actuator/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-spring-boot/dubbo-spring-boot-actuator/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/pom.xml index 50d0c175378e..ddc4a7412744 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/pom.xml @@ -46,7 +46,7 @@ org.springframework.boot - spring-boot-starter-logging + spring-boot-starter-log4j2 true diff --git a/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/src/test/resources/log4j2-test.xml b/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-spring-boot/dubbo-spring-boot-autoconfigure/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/pom.xml index 5261f5197950..a185cbb07c92 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/pom.xml @@ -100,6 +100,10 @@ spring-boot-starter-test test - + + org.springframework.boot + spring-boot-starter-log4j2 + test + diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/src/test/resources/log4j2-test.xml b/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/actuator/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/pom.xml index d9e06fa06c8f..79fca44df3ad 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/pom.xml @@ -47,7 +47,7 @@ org.springframework.boot - spring-boot-starter-logging + spring-boot-starter-log4j2 true diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/resources/log4j2-test.xml b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-curator5-spring-boot-starter/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-curator5-spring-boot-starter/pom.xml index ee3b69fe9adc..7fd88c833835 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-curator5-spring-boot-starter/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-curator5-spring-boot-starter/pom.xml @@ -34,18 +34,6 @@ 3.8.3 - - - - org.apache.zookeeper - parent - ${zookeeper_version} - pom - import - - - - org.apache.curator diff --git a/dubbo-spring-boot/dubbo-spring-boot-starters/observability/autoconfigure/src/test/resources/log4j2-test.xml b/dubbo-spring-boot/dubbo-spring-boot-starters/observability/autoconfigure/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-spring-boot/dubbo-spring-boot-starters/observability/autoconfigure/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-spring-boot/pom.xml b/dubbo-spring-boot/pom.xml index 1d072e958eb6..2cb284620719 100644 --- a/dubbo-spring-boot/pom.xml +++ b/dubbo-spring-boot/pom.xml @@ -42,7 +42,6 @@ 2.7.17 1.14.9 - 1.7.33 4.11.0 @@ -73,13 +72,12 @@ org.slf4j log4j-over-slf4j + + org.slf4j + log4j-to-slf4j + - - org.slf4j - slf4j-log4j12 - ${slf4j-log4j12_version} - org.mockito mockito-core @@ -121,9 +119,8 @@ test - org.slf4j - slf4j-log4j12 - ${slf4j-log4j12_version} + org.apache.logging.log4j + log4j-slf4j-impl test diff --git a/dubbo-test/dubbo-test-check/pom.xml b/dubbo-test/dubbo-test-check/pom.xml index caaa65124394..9173c50743e5 100644 --- a/dubbo-test/dubbo-test-check/pom.xml +++ b/dubbo-test/dubbo-test-check/pom.xml @@ -90,7 +90,7 @@ 5.1.0 - 3.6.0 + 3.7.2 5.1.0 diff --git a/dubbo-test/dubbo-test-common/pom.xml b/dubbo-test/dubbo-test-common/pom.xml index 9f82b3b271d8..d759f0574492 100644 --- a/dubbo-test/dubbo-test-common/pom.xml +++ b/dubbo-test/dubbo-test-common/pom.xml @@ -35,6 +35,10 @@ org.apache.zookeeper zookeeper + + org.apache.logging.log4j + log4j-slf4j-impl + org.apache.dubbo diff --git a/dubbo-test/dubbo-test-common/src/main/resources/log4j2-test.xml b/dubbo-test/dubbo-test-common/src/main/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-test/dubbo-test-common/src/main/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-test/dubbo-test-modules/src/test/resources/log4j2-test.xml b/dubbo-test/dubbo-test-modules/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-test/dubbo-test-modules/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-test/dubbo-test-spring/pom.xml b/dubbo-test/dubbo-test-spring/pom.xml index a0b4bf91cc0c..3ba048cc35da 100644 --- a/dubbo-test/dubbo-test-spring/pom.xml +++ b/dubbo-test/dubbo-test-spring/pom.xml @@ -130,8 +130,8 @@ ${project.version} - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl @@ -169,17 +169,14 @@ org.apache.curator curator-framework - compile org.apache.curator curator-recipes - compile org.apache.zookeeper zookeeper - compile diff --git a/dubbo-test/dubbo-test-spring/src/main/resources/log4j.properties b/dubbo-test/dubbo-test-spring/src/main/resources/log4j.properties deleted file mode 100644 index 8de4c4fddbb4..000000000000 --- a/dubbo-test/dubbo-test-spring/src/main/resources/log4j.properties +++ /dev/null @@ -1,7 +0,0 @@ -###set log levels### -log4j.rootLogger=info, stdout -###output to the console### -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n diff --git a/dubbo-xds/src/test/resources/log4j2-test.xml b/dubbo-xds/src/test/resources/log4j2-test.xml new file mode 100644 index 000000000000..0c9b0ec100d6 --- /dev/null +++ b/dubbo-xds/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 4212a04f4c77..403baf2a3896 100644 --- a/pom.xml +++ b/pom.xml @@ -403,7 +403,7 @@ - + @@ -428,6 +428,8 @@ flatten-maven-plugin ${maven_flatten_version} + target + target true oss