AOT causes Logback configuration error when using include #41081
Labels
theme: aot
An issue related to Ahead-of-time processing
type: regression
A regression from a previous release
Milestone
Starting an application with AOT and a custom Logback configuration file (logback-spring.xml) with
<include>
elements can cause configuration errors (specially with file appenders).The issue is caused by loading the serialized
/META-INF/spring/logback-model
and processing the model again.By processing the model all
<include>
elements will load the configuration files again and attach the parsed submodules to the existing ones loaded from the serialized file.This might not cause issues for a ConsoleAppender, but will cause a configuration error for FileAppender (same file name).
Breakpoint in ch.qos.logback.core.model.processor.IncludeModelHandler
Version
Tested with Spring Boot 3.3.1-SNAPSHOT and Java 21
Stacktrace:
logback-spring.xml
Reproducing the issue:
demo.zip
unzip demo.zip cd demo mvn package java -jar -Dspring.aot.enabled=true target/demo-0.0.1-SNAPSHOT.jar
The text was updated successfully, but these errors were encountered: