#StackBounty: #java #spring #spring-boot #logback Spring boot does not load logback-spring.xml

Bounty: 100

I have a sample Spring Boot application that uses Logback for logging.
So I have logback-spring.xml next to the jar to configure the logging, however it does not work unless I specify it with logging.config, ex : logging.config=logback-spring.xml.

I have looked into Spring Boot ignoring logback-spring.xml where it suggests that it might be because there’s already a spring.xml somewhere, but putting breakpoint on org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(LoggingInitializationContext, LogFile) shows that logFile is empty.

Am I doing something wrong here ?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.