[BUG] Spring Boot 3.0.0-M5 - new logback version included into Spring Boot causing error
marceligrabowski opened this issue · 1 comments
Describe the bug
While using Spring Boot 3.0.0-M5 skrape.it is failing as Spring Boot is using internally logback-classic in version >=1.3.0 which changes contract of Configurator
Error is:
Caused by: java.lang.AbstractMethodError: Receiver class it.skrape.fetcher.logging.LoggingConfigurator does not define or inherit an implementation of the resolved method 'abstract ch.qos.logback.classic.spi.Configurator$ExecutionStatus configure(ch.qos.logback.classic.LoggerContext)' of interface ch.qos.logback.classic.spi.Configurator.
Code Sample
upgrading logback to >=1.3.0 for browser-fetcher and changing LoggingConfigurator
from:
override fun configure(loggerContext: LoggerContext) {
val consoleAppender = ConsoleAppender<ILoggingEvent>()
// omitted for clarity
rootLogger.addAppender(consoleAppender)
}
into:
override fun configure(loggerContext: LoggerContext): Configurator.ExecutionStatus? {
val consoleAppender = ConsoleAppender<ILoggingEvent>()
// omitted for clarity
rootLogger.addAppender(consoleAppender)
return Configurator.ExecutionStatus.NEUTRAL
}
should do the trick.
I'll prepare change and test it with older version of Spring Boot/any app using older logback-classic if that won't harm anything
Thx 🙏