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..d99d30081ea5 --- /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 000000000000..e2db441abb6c Binary files /dev/null and b/dubbo-common/src/main/resources/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat differ diff --git a/dubbo-common/src/test/java/org/apache/dubbo/common/cache/FileCacheStoreFactoryTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/cache/FileCacheStoreFactoryTest.java index 4eec702f7265..26b89c95776e 100644 --- a/dubbo-common/src/test/java/org/apache/dubbo/common/cache/FileCacheStoreFactoryTest.java +++ b/dubbo-common/src/test/java/org/apache/dubbo/common/cache/FileCacheStoreFactoryTest.java @@ -71,9 +71,9 @@ void testCacheContains() throws URISyntaxException { } 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-common/src/test/java/org/apache/dubbo/common/cache/FileCacheStoreTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/cache/FileCacheStoreTest.java index fd2798ad330e..6bb280cc2b87 100644 --- a/dubbo-common/src/test/java/org/apache/dubbo/common/cache/FileCacheStoreTest.java +++ b/dubbo-common/src/test/java/org/apache/dubbo/common/cache/FileCacheStoreTest.java @@ -68,9 +68,9 @@ void testFileSizeExceed() throws Exception { } 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-common/src/test/java/org/apache/dubbo/common/utils/DubboAppenderTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/DubboAppenderTest.java index 8b4d6c4f445a..2607ff877ccd 100644 --- a/dubbo-common/src/test/java/org/apache/dubbo/common/utils/DubboAppenderTest.java +++ b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/DubboAppenderTest.java @@ -16,9 +16,9 @@ */ package org.apache.dubbo.common.utils; -import org.apache.log4j.Category; -import org.apache.log4j.Level; -import org.apache.log4j.spi.LoggingEvent; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.core.impl.Log4jLogEvent; +import org.apache.logging.log4j.message.SimpleMessage; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -33,15 +33,15 @@ import static org.mockito.Mockito.when; class DubboAppenderTest { - private LoggingEvent event; + private Log4jLogEvent event; @BeforeEach public void setUp() throws Exception { - event = mock(LoggingEvent.class); - when(event.getLogger()).thenReturn(mock(Category.class)); - when(event.getLevel()).thenReturn(mock(Level.class)); + event = mock(Log4jLogEvent.class); + when(event.getLoggerName()).thenReturn("logger-name"); + when(event.getLevel()).thenReturn(Level.INFO); when(event.getThreadName()).thenReturn("thread-name"); - when(event.getMessage()).thenReturn("message"); + when(event.getMessage()).thenReturn(new SimpleMessage("message")); } @AfterEach @@ -63,7 +63,7 @@ void testAvailable() { void testAppend() { DubboAppender appender = new DubboAppender(); appender.append(event); - assumeTrue(0 == DubboAppender.logList.size()); + assumeTrue(DubboAppender.logList.isEmpty()); DubboAppender.doStart(); appender.append(event); assertThat(DubboAppender.logList, hasSize(1)); diff --git a/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LogTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LogTest.java index 391312dab374..63dfa393c35b 100644 --- a/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LogTest.java +++ b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LogTest.java @@ -16,7 +16,8 @@ */ package org.apache.dubbo.common.utils; -import org.apache.log4j.Level; +import org.apache.dubbo.common.logger.Level; + import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LogUtilTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LogUtilTest.java index e88e8669569f..1ecee9cb6604 100644 --- a/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LogUtilTest.java +++ b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LogUtilTest.java @@ -16,7 +16,8 @@ */ package org.apache.dubbo.common.utils; -import org.apache.log4j.Level; +import org.apache.dubbo.common.logger.Level; + import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; diff --git a/dubbo-common/src/test/resources/log4j.xml b/dubbo-common/src/test/resources/log4j.xml deleted file mode 100644 index 377b2a65dc3d..000000000000 --- a/dubbo-common/src/test/resources/log4j.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - 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..f57620d1434f --- /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/java/org/apache/dubbo/config/ApplicationConfigTest.java b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java index fb2b13d6eb1f..00cc6173f491 100644 --- a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java +++ b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java @@ -124,8 +124,8 @@ void testMonitor() { @Test void testLogger() { ApplicationConfig application = new ApplicationConfig("app"); - application.setLogger("log4j"); - assertThat(application.getLogger(), equalTo("log4j")); + application.setLogger("log4j2"); + assertThat(application.getLogger(), equalTo("log4j2")); } @Test 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..f57620d1434f --- /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/java/org/apache/dubbo/config/ApplicationConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java index 54dacb1a7736..d5f1c4e9e541 100644 --- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java +++ b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java @@ -142,8 +142,8 @@ void testMonitor() { @Test void testLogger() { ApplicationConfig application = new ApplicationConfig("app"); - application.setLogger("log4j"); - assertThat(application.getLogger(), equalTo("log4j")); + application.setLogger("log4j2"); + assertThat(application.getLogger(), equalTo("log4j2")); } @Test diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java index 675e3ee5028e..6b17d2a45d45 100644 --- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java +++ b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java @@ -161,7 +161,7 @@ void testAppendConfig() { applicationConfig.setArchitecture("architecture1"); applicationConfig.setEnvironment("test"); applicationConfig.setCompiler("javassist"); - applicationConfig.setLogger("log4j"); + applicationConfig.setLogger("log4j2"); applicationConfig.setDumpDirectory("/"); applicationConfig.setQosEnable(false); applicationConfig.setQosHost("127.0.0.1"); diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/bootstrap/builders/ApplicationBuilderTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/bootstrap/builders/ApplicationBuilderTest.java index c41be4808454..90042a01c1ad 100644 --- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/bootstrap/builders/ApplicationBuilderTest.java +++ b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/bootstrap/builders/ApplicationBuilderTest.java @@ -86,8 +86,8 @@ void compiler() { @Test void logger() { ApplicationBuilder builder = new ApplicationBuilder(); - builder.logger("log4j"); - Assertions.assertEquals("log4j", builder.build().getLogger()); + builder.logger("log4j2"); + Assertions.assertEquals("log4j2", builder.build().getLogger()); } @Test @@ -255,7 +255,7 @@ void build() { .architecture("architecture") .environment("develop") .compiler("compiler") - .logger("log4j") + .logger("log4j2") .monitor(monitor) .isDefault(false) .dumpDirectory("dumpDirectory") @@ -282,7 +282,7 @@ void build() { Assertions.assertEquals("architecture", config.getArchitecture()); Assertions.assertEquals("develop", config.getEnvironment()); Assertions.assertEquals("compiler", config.getCompiler()); - Assertions.assertEquals("log4j", config.getLogger()); + Assertions.assertEquals("log4j2", config.getLogger()); Assertions.assertSame(monitor, config.getMonitor()); Assertions.assertFalse(config.isDefault()); Assertions.assertEquals("dumpDirectory", config.getDumpDirectory()); 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..f57620d1434f --- /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..f57620d1434f --- /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/pom.xml b/dubbo-configcenter/dubbo-configcenter-nacos/pom.xml index e3cce7faf9d4..4d8eb91d3645 100644 --- a/dubbo-configcenter/dubbo-configcenter-nacos/pom.xml +++ b/dubbo-configcenter/dubbo-configcenter-nacos/pom.xml @@ -58,5 +58,10 @@ dubbo-metrics-config-center ${project.parent.version} + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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..f57620d1434f --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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 a09871ebabb5..cbe1fd58af34 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 @@ -17,6 +17,7 @@ package org.apache.dubbo.demo.graalvm.consumer; import org.apache.dubbo.common.constants.CommonConstants; +import org.apache.dubbo.common.constants.CommonConstants.DubboProperty; import org.apache.dubbo.common.utils.SystemPropertyConfigUtils; import org.apache.dubbo.config.ApplicationConfig; import org.apache.dubbo.config.ProtocolConfig; @@ -33,10 +34,9 @@ public class Application { private static final String REGISTRY_URL = "zookeeper://127.0.0.1:2181"; public static void main(String[] args) { - SystemPropertyConfigUtils.setSystemProperty(CommonConstants.DubboProperty.DUBBO_APPLICATION_LOGGER, "log4j"); + SystemPropertyConfigUtils.setSystemProperty(DubboProperty.DUBBO_APPLICATION_LOGGER, "logback"); System.setProperty("native", "true"); - SystemPropertyConfigUtils.setSystemProperty( - CommonConstants.DubboProperty.DUBBO_PREFER_JSON_FRAMEWORK_NAME, "fastjson"); + SystemPropertyConfigUtils.setSystemProperty(DubboProperty.DUBBO_PREFER_JSON_FRAMEWORK_NAME, "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..bd7e5b427a8d --- /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 a959686674b3..8294638eca08 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 @@ -17,6 +17,7 @@ package org.apache.dubbo.demo.graalvm.provider; import org.apache.dubbo.common.constants.CommonConstants; +import org.apache.dubbo.common.constants.CommonConstants.DubboProperty; import org.apache.dubbo.common.utils.SystemPropertyConfigUtils; import org.apache.dubbo.config.ApplicationConfig; import org.apache.dubbo.config.ProtocolConfig; @@ -33,10 +34,9 @@ public class Application { private static final String REGISTRY_URL = "zookeeper://127.0.0.1:2181"; public static void main(String[] args) throws Exception { - SystemPropertyConfigUtils.setSystemProperty(CommonConstants.DubboProperty.DUBBO_APPLICATION_LOGGER, "log4j"); + SystemPropertyConfigUtils.setSystemProperty(DubboProperty.DUBBO_APPLICATION_LOGGER, "logback"); System.setProperty("native", "true"); - SystemPropertyConfigUtils.setSystemProperty( - CommonConstants.DubboProperty.DUBBO_PREFER_JSON_FRAMEWORK_NAME, "fastjson"); + SystemPropertyConfigUtils.setSystemProperty(DubboProperty.DUBBO_PREFER_JSON_FRAMEWORK_NAME, "fastjson"); startWithBootstrap(); System.in.read(); } 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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..bd7e5b427a8d --- /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..ed0e3b312e21 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 diff --git a/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml b/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml index 12e64cfaa8e5..a86327cb2ec4 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 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..f57620d1434f --- /dev/null +++ b/dubbo-kubernetes/src/test/resources/log4j2-test.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/dubbo-metadata/dubbo-metadata-api/pom.xml b/dubbo-metadata/dubbo-metadata-api/pom.xml index abe5dd375244..8fc6af86eaee 100644 --- a/dubbo-metadata/dubbo-metadata-api/pom.xml +++ b/dubbo-metadata/dubbo-metadata-api/pom.xml @@ -69,6 +69,11 @@ ${project.parent.version} + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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/pom.xml b/dubbo-metadata/dubbo-metadata-report-redis/pom.xml index e35b79374aac..bdeb867c5732 100644 --- a/dubbo-metadata/dubbo-metadata-report-redis/pom.xml +++ b/dubbo-metadata/dubbo-metadata-report-redis/pom.xml @@ -49,5 +49,10 @@ commons-lang3 test + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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..f57620d1434f --- /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/pom.xml b/dubbo-metrics/dubbo-metrics-api/pom.xml index 9b92ba14d32b..da9570a5d07f 100644 --- a/dubbo-metrics/dubbo-metrics-api/pom.xml +++ b/dubbo-metrics/dubbo-metrics-api/pom.xml @@ -54,5 +54,10 @@ com.tdunning t-digest + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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/pom.xml b/dubbo-metrics/dubbo-metrics-config-center/pom.xml index d69c48b57e74..0013a71fc937 100644 --- a/dubbo-metrics/dubbo-metrics-config-center/pom.xml +++ b/dubbo-metrics/dubbo-metrics-config-center/pom.xml @@ -30,5 +30,10 @@ dubbo-metrics-api ${project.parent.version} + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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/pom.xml b/dubbo-metrics/dubbo-metrics-default/pom.xml index 8493e3c2851a..98fb0890137e 100644 --- a/dubbo-metrics/dubbo-metrics-default/pom.xml +++ b/dubbo-metrics/dubbo-metrics-default/pom.xml @@ -48,5 +48,10 @@ micrometer-test test + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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/pom.xml b/dubbo-metrics/dubbo-metrics-metadata/pom.xml index d6cf291fdc0d..1de43cac9449 100644 --- a/dubbo-metrics/dubbo-metrics-metadata/pom.xml +++ b/dubbo-metrics/dubbo-metrics-metadata/pom.xml @@ -36,5 +36,10 @@ dubbo-metrics-api ${project.parent.version} + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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/pom.xml b/dubbo-metrics/dubbo-metrics-prometheus/pom.xml index 1a88d4951b26..d02b5194f8f9 100644 --- a/dubbo-metrics/dubbo-metrics-prometheus/pom.xml +++ b/dubbo-metrics/dubbo-metrics-prometheus/pom.xml @@ -60,5 +60,10 @@ ${project.parent.version} compile + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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/pom.xml b/dubbo-metrics/dubbo-metrics-registry/pom.xml index f03625270a84..b1287adfee56 100644 --- a/dubbo-metrics/dubbo-metrics-registry/pom.xml +++ b/dubbo-metrics/dubbo-metrics-registry/pom.xml @@ -36,5 +36,10 @@ dubbo-metrics-api ${project.parent.version} + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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/pom.xml b/dubbo-metrics/dubbo-tracing/pom.xml index 83e8f51b075f..2979b08cd926 100644 --- a/dubbo-metrics/dubbo-tracing/pom.xml +++ b/dubbo-metrics/dubbo-tracing/pom.xml @@ -110,5 +110,10 @@ zipkin-sender-urlconnection true + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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/pom.xml b/dubbo-monitor/dubbo-monitor-common/pom.xml index f83f017a982d..9d04a09065d3 100644 --- a/dubbo-monitor/dubbo-monitor-common/pom.xml +++ b/dubbo-monitor/dubbo-monitor-common/pom.xml @@ -41,5 +41,10 @@ dubbo-cluster ${project.parent.version} + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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 index eb01deaffe9d..bff86b131049 100644 --- a/dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j.xml +++ b/dubbo-plugin/dubbo-plugin-access-log/src/test/resources/log4j.xml @@ -16,22 +16,7 @@ limitations under the License. --> - - - - - - - - - - - - - + @@ -40,7 +25,6 @@ - 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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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 32e74a1cef16..519d0ebd9b89 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 @@ -124,9 +124,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..f57620d1434f --- /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/pom.xml b/dubbo-registry/dubbo-registry-multicast/pom.xml index 6269d50fc280..fd934a90cac3 100644 --- a/dubbo-registry/dubbo-registry-multicast/pom.xml +++ b/dubbo-registry/dubbo-registry-multicast/pom.xml @@ -36,5 +36,10 @@ dubbo-registry-api ${project.parent.version} + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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..f57620d1434f --- /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/pom.xml b/dubbo-registry/dubbo-registry-zookeeper/pom.xml index f1e9cfa3d23c..f4ccf4f23a51 100644 --- a/dubbo-registry/dubbo-registry-zookeeper/pom.xml +++ b/dubbo-registry/dubbo-registry-zookeeper/pom.xml @@ -45,5 +45,10 @@ org.apache.curator curator-x-discovery + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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/pom.xml b/dubbo-remoting/dubbo-remoting-zookeeper-curator5/pom.xml index e786281cce5d..9015bb26eeaa 100644 --- a/dubbo-remoting/dubbo-remoting-zookeeper-curator5/pom.xml +++ b/dubbo-remoting/dubbo-remoting-zookeeper-curator5/pom.xml @@ -65,5 +65,10 @@ dubbo-native ${project.parent.version} + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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..f46f4145dafc --- /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..8ff642b32f0f --- /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/pom.xml b/dubbo-rpc/dubbo-rpc-injvm/pom.xml index 66d86080a38d..7cd15fc3f8b0 100644 --- a/dubbo-rpc/dubbo-rpc-injvm/pom.xml +++ b/dubbo-rpc/dubbo-rpc-injvm/pom.xml @@ -48,5 +48,10 @@ ${project.parent.version} test + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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..2e27452ad6af 100644 --- a/dubbo-rpc/dubbo-rpc-rest/pom.xml +++ b/dubbo-rpc/dubbo-rpc-rest/pom.xml @@ -27,9 +27,11 @@ jar ${project.artifactId} The rest rpc module of dubbo project + false + org.apache.dubbo @@ -165,6 +167,17 @@ org.springframework.cloud spring-cloud-openfeign-core test + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.apache.logging.log4j + log4j-slf4j-impl + 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..f57620d1434f --- /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..f57620d1434f --- /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/pom.xml b/dubbo-serialization/dubbo-serialization-fastjson2/pom.xml index 432de6f89d1b..a70be8c15e0b 100644 --- a/dubbo-serialization/dubbo-serialization-fastjson2/pom.xml +++ b/dubbo-serialization/dubbo-serialization-fastjson2/pom.xml @@ -41,5 +41,10 @@ limitations under the License. com.alibaba.fastjson2 fastjson2 + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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/pom.xml b/dubbo-serialization/dubbo-serialization-hessian2/pom.xml index 49728e18f426..c6ba6bd6fa41 100644 --- a/dubbo-serialization/dubbo-serialization-hessian2/pom.xml +++ b/dubbo-serialization/dubbo-serialization-hessian2/pom.xml @@ -40,5 +40,10 @@ limitations under the License. com.alibaba hessian-lite + + org.apache.logging.log4j + log4j-slf4j-impl + test + 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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..f57620d1434f --- /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..c95598fe73d3 100644 --- a/pom.xml +++ b/pom.xml @@ -403,7 +403,7 @@ - +