Skip to content

Commit

Permalink
Upgrade logback version
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Oct 21, 2023
1 parent 5003f4d commit 0ae438f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<elasticjob.version>3.0.4</elasticjob.version>

<slf4j.version>2.0.9</slf4j.version>
<logback.version>1.2.12</logback.version>
<logback.version>1.4.11</logback.version>
<commons-logging.version>1.2</commons-logging.version>

<lombok.version>1.18.30</lombok.version>
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 0ae438f

Please sign in to comment.