From 8ea4091e41502fe09472247c9479f57ce46539b7 Mon Sep 17 00:00:00 2001 From: Liang Zhang Date: Sat, 21 Oct 2023 18:31:16 +0800 Subject: [PATCH] Use slf4j-bom (#28826) * Use slf4j-bom * Upgrade logback version * Upgrade logback version * Upgrade logback version * Upgrade logback version * Upgrade logback version --- .../log/LogbackConfigurationFixture.java | 3 ++- .../proxy-native/src/main/release-docs/LICENSE | 10 +++++----- .../proxy/src/main/release-docs/LICENSE | 10 +++++----- pom.xml | 18 +++++------------- .../proxy/config/LogbackConfiguration.java | 3 ++- 5 files changed, 19 insertions(+), 25 deletions(-) diff --git a/agent/core/src/test/java/org/apache/shardingsphere/fixture/log/LogbackConfigurationFixture.java b/agent/core/src/test/java/org/apache/shardingsphere/fixture/log/LogbackConfigurationFixture.java index 287d399713743..b99cd34924f3f 100644 --- a/agent/core/src/test/java/org/apache/shardingsphere/fixture/log/LogbackConfigurationFixture.java +++ b/agent/core/src/test/java/org/apache/shardingsphere/fixture/log/LogbackConfigurationFixture.java @@ -39,7 +39,7 @@ public final class LogbackConfigurationFixture extends BasicConfigurator { public static final String SHARDINGSPHERE_LOGGER_NAME = "org.apache.shardingsphere.agent"; @Override - public void configure(final LoggerContext loggerContext) { + public ExecutionStatus configure(final LoggerContext loggerContext) { Appender appender = createFileAppender(loggerContext); Logger rootLogger = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME); rootLogger.setLevel(Level.INFO); @@ -48,6 +48,7 @@ public void configure(final LoggerContext loggerContext) { logger.setLevel(Level.INFO); logger.setAdditive(false); logger.addAppender(appender); + return ExecutionStatus.NEUTRAL; } private FileAppender createFileAppender(final LoggerContext loggerContext) { diff --git a/distribution/proxy-native/src/main/release-docs/LICENSE b/distribution/proxy-native/src/main/release-docs/LICENSE index 65f539e1ec826..c5fa7f3dde2c6 100644 --- a/distribution/proxy-native/src/main/release-docs/LICENSE +++ b/distribution/proxy-native/src/main/release-docs/LICENSE @@ -262,7 +262,7 @@ The text of each license is the standard Apache 2.0 license. jackson-databind 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0 jackson-dataformat-yaml 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0 jackson-datatype-jsr310 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0 - jcl-over-slf4j 1.7.36: https://github.com/qos-ch/slf4j, Apache 2.0 + jcl-over-slf4j 2.0.9: https://github.com/qos-ch/slf4j, Apache 2.0 jetcd-api 0.7.6: https://github.com/etcd-io/jetcd, Apache 2.0 jetcd-common 0.7.6: https://github.com/etcd-io/jetcd, Apache 2.0 jetcd-core 0.7.6: https://github.com/etcd-io/jetcd, Apache 2.0 @@ -355,8 +355,8 @@ EPL licenses The following components are provided under the EPL License. See project link for details. The text of each license is also included at licenses/LICENSE-[project].txt. - logback-classic 1.2.12: https://github.com/qos-ch/logback, EPL 1.0 - logback-core 1.2.12: https://github.com/qos-ch/logback, EPL 1.0 + logback-classic 1.3.11: https://github.com/qos-ch/logback, EPL 1.0 + logback-core 1.3.11: https://github.com/qos-ch/logback, EPL 1.0 mchange-commons-java 0.2.15: https://github.com/swaldman/mchange-commons-java, EPL 1.0 h2 2.2.224: https://github.com/h2database/h2database, EPL 1.0 @@ -372,5 +372,5 @@ The text of each license is also included at licenses/LICENSE-[project].txt. bctls-jdk15on 1.70: https://www.bouncycastle.org, MIT bcutil-jdk15on 1.70: https://www.bouncycastle.org, MIT checker-qual 3.39.0: https://github.com/typetools/checker-framework/blob/master/checker-qual, MIT - jul-to-slf4j 1.7.36: https://www.slf4j.org, MIT - slf4j-api 1.7.36: https://www.slf4j.org, MIT + jul-to-slf4j 2.0.9: https://www.slf4j.org, MIT + slf4j-api 2.0.9: https://www.slf4j.org, MIT diff --git a/distribution/proxy/src/main/release-docs/LICENSE b/distribution/proxy/src/main/release-docs/LICENSE index 65f539e1ec826..c5fa7f3dde2c6 100644 --- a/distribution/proxy/src/main/release-docs/LICENSE +++ b/distribution/proxy/src/main/release-docs/LICENSE @@ -262,7 +262,7 @@ The text of each license is the standard Apache 2.0 license. jackson-databind 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0 jackson-dataformat-yaml 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0 jackson-datatype-jsr310 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0 - jcl-over-slf4j 1.7.36: https://github.com/qos-ch/slf4j, Apache 2.0 + jcl-over-slf4j 2.0.9: https://github.com/qos-ch/slf4j, Apache 2.0 jetcd-api 0.7.6: https://github.com/etcd-io/jetcd, Apache 2.0 jetcd-common 0.7.6: https://github.com/etcd-io/jetcd, Apache 2.0 jetcd-core 0.7.6: https://github.com/etcd-io/jetcd, Apache 2.0 @@ -355,8 +355,8 @@ EPL licenses The following components are provided under the EPL License. See project link for details. The text of each license is also included at licenses/LICENSE-[project].txt. - logback-classic 1.2.12: https://github.com/qos-ch/logback, EPL 1.0 - logback-core 1.2.12: https://github.com/qos-ch/logback, EPL 1.0 + logback-classic 1.3.11: https://github.com/qos-ch/logback, EPL 1.0 + logback-core 1.3.11: https://github.com/qos-ch/logback, EPL 1.0 mchange-commons-java 0.2.15: https://github.com/swaldman/mchange-commons-java, EPL 1.0 h2 2.2.224: https://github.com/h2database/h2database, EPL 1.0 @@ -372,5 +372,5 @@ The text of each license is also included at licenses/LICENSE-[project].txt. bctls-jdk15on 1.70: https://www.bouncycastle.org, MIT bcutil-jdk15on 1.70: https://www.bouncycastle.org, MIT checker-qual 3.39.0: https://github.com/typetools/checker-framework/blob/master/checker-qual, MIT - jul-to-slf4j 1.7.36: https://www.slf4j.org, MIT - slf4j-api 1.7.36: https://www.slf4j.org, MIT + jul-to-slf4j 2.0.9: https://www.slf4j.org, MIT + slf4j-api 2.0.9: https://www.slf4j.org, MIT diff --git a/pom.xml b/pom.xml index bff2475baa124..d5dab7208a73a 100644 --- a/pom.xml +++ b/pom.xml @@ -100,8 +100,8 @@ 3.0.4 - 1.7.36 - 1.2.12 + 2.0.9 + 1.3.11 1.2 1.18.30 @@ -389,18 +389,10 @@ org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - - - org.slf4j - jul-to-slf4j + slf4j-bom ${slf4j.version} + pom + import diff --git a/proxy/bootstrap/src/main/java/org/apache/shardingsphere/proxy/config/LogbackConfiguration.java b/proxy/bootstrap/src/main/java/org/apache/shardingsphere/proxy/config/LogbackConfiguration.java index cf38e53277da8..82baa3c31d18e 100644 --- a/proxy/bootstrap/src/main/java/org/apache/shardingsphere/proxy/config/LogbackConfiguration.java +++ b/proxy/bootstrap/src/main/java/org/apache/shardingsphere/proxy/config/LogbackConfiguration.java @@ -39,12 +39,13 @@ public class LogbackConfiguration extends BasicConfigurator { public static final String NETTY_LOGGER_NAME = "io.netty"; @Override - public void configure(final LoggerContext loggerContext) { + public ExecutionStatus configure(final LoggerContext loggerContext) { ConsoleAppender consoleAppender = createConsoleAppender(loggerContext); Logger rootLogger = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME); rootLogger.setLevel(Level.INFO); rootLogger.addAppender(consoleAppender); initBasicLogger(loggerContext); + return ExecutionStatus.NEUTRAL; } private ConsoleAppender createConsoleAppender(final LoggerContext loggerContext) {