You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by su...@apache.org on 2023/10/21 10:31:23 UTC

[shardingsphere] branch master updated: Use slf4j-bom (#28826)

This is an automated email from the ASF dual-hosted git repository.

sunnianjun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ea4091e415 Use slf4j-bom (#28826)
8ea4091e415 is described below

commit 8ea4091e41502fe09472247c9479f57ce46539b7
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Oct 21 18:31:16 2023 +0800

    Use slf4j-bom (#28826)
    
    * Use slf4j-bom
    
    * Upgrade logback version
    
    * Upgrade logback version
    
    * Upgrade logback version
    
    * Upgrade logback version
    
    * Upgrade logback version
---
 .../fixture/log/LogbackConfigurationFixture.java       |  3 ++-
 .../proxy-native/src/main/release-docs/LICENSE         | 10 +++++-----
 distribution/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 287d3997137..b99cd34924f 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<ILoggingEvent> appender = createFileAppender(loggerContext);
         Logger rootLogger = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME);
         rootLogger.setLevel(Level.INFO);
@@ -48,6 +48,7 @@ public final class LogbackConfigurationFixture extends BasicConfigurator {
         logger.setLevel(Level.INFO);
         logger.setAdditive(false);
         logger.addAppender(appender);
+        return ExecutionStatus.NEUTRAL;
     }
     
     private FileAppender<ILoggingEvent> 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 65f539e1ec8..c5fa7f3dde2 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 65f539e1ec8..c5fa7f3dde2 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 bff2475baa1..d5dab7208a7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,8 +100,8 @@
         
         <elasticjob.version>3.0.4</elasticjob.version>
         
-        <slf4j.version>1.7.36</slf4j.version>
-        <logback.version>1.2.12</logback.version>
+        <slf4j.version>2.0.9</slf4j.version>
+        <logback.version>1.3.11</logback.version>
         <commons-logging.version>1.2</commons-logging.version>
         
         <lombok.version>1.18.30</lombok.version>
@@ -389,18 +389,10 @@
             
             <dependency>
                 <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-                <version>${slf4j.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>jcl-over-slf4j</artifactId>
-                <version>${slf4j.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>jul-to-slf4j</artifactId>
+                <artifactId>slf4j-bom</artifactId>
                 <version>${slf4j.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
             </dependency>
             
             <dependency>
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 cf38e53277d..82baa3c31d1 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<ILoggingEvent> 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<ILoggingEvent> createConsoleAppender(final LoggerContext loggerContext) {