Skip to content

Commit

Permalink
Use slf4j-bom (#28826)
Browse files Browse the repository at this point in the history
* Use slf4j-bom

* Upgrade logback version

* Upgrade logback version

* Upgrade logback version

* Upgrade logback version

* Upgrade logback version
  • Loading branch information
terrymanu authored Oct 21, 2023
1 parent 7e3d38e commit 8ea4091
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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<ILoggingEvent> createFileAppender(final LoggerContext loggerContext) {
Expand Down
10 changes: 5 additions & 5 deletions distribution/proxy-native/src/main/release-docs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
10 changes: 5 additions & 5 deletions distribution/proxy/src/main/release-docs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
18 changes: 5 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8ea4091

Please sign in to comment.