- Logback INFO messages are always reported if other loggers are still printing logs before logback configuration is complete.
- I have found an issue in the
org.springframework.boot.logging.logback.LogbackLoggingSystemclass, specifically on line 280. At this point, all initial default states (including appenders and filters) of loggerContext have been cleared. If other loggers are still printing logs (such asorg.springframework.jndi.JndiTemplatewhich reads environment variable values from<springProperty scope="context" ...>), a warningnoAppenderDefinedWarningwill be issued, causingStatusPrinter.printInCaseOfErrorsOrWarnings(loggerContext)to be executed. This will ultimately result in a large amount of unimportant logs being printed before SpringBoot completes startup.
Fixes https://github.com/spring-projects/spring-boot/issues/34505
Comment From: philwebb
Thanks for the PR, but I think the comment in https://github.com/spring-projects/spring-boot/issues/34505#issuecomment-1458395104 still stands and we need some more investigation to determine if this is the best way to fix it.