Closed RobbanHoglund closed 3 months ago
@RobbanHoglund I believe this issue is related to https://github.com/spring-projects/spring-boot/issues/40491
Upgrading to spring-boot 3.3 should fix the issue. If you could please test and report back here, that would be great.
We just upgraded to Spring-boot 3.3.0 and then our customized access-logs stopped working.
I think this change is the reason
https://github.com/qos-ch/logback/commit/af92be47a940393e11decab0a7ee4cb802d2b5e8#diff-3538035db17d89a86f9994c100501b7459ca7a961a4fc843dd95a02a21326b1b
And Spring fixed it for the applications logs here https://github.com/spring-projects/spring-boot/commit/3c00bf367d7b03d8b8e005e8097c295996290b59#diff-7d71ee2ca0b78c3f953c1d4a753583f773d0c6d840cc195a6249389714c2166a
But it is NOT working for Tomcat´s access-logs
@RobbanHoglund I think this is a logback-access issue. Which version of logback-access are you using? Which version of Tomcat?
Here is the tomcat deps which are from Spring´s dependency management
https://github.com/spring-projects/spring-boot/blob/v3.3.0/gradle.properties#L18
Thank you for this information. Which version of logback-access are you using?
Here are the deps. which you recommended here: https://logback.qos.ch/access.html
Issue fixed in commit c9447c53b5919d87 to be released in version logback-access version 2.0.2
Hi, @ceki have the same issue is it possible to get a snapshot version to verify the fix?
Managed to build the project locally and use the jars for common and tomcat, works as expected!
Super nice with the quick fix, thanks!
Thanks for a quick fix of this issue, when is 2.0.2 planned to be released?
Thanks for a quick fix of this issue, when is 2.0.2 planned to be released?
Not before sometime in June I am afraid.
any update on this?
I have tested this with a Spring Boot 3.3.1 application running on Jetty 12. The issue exists with Jetty as well, and I can confirm that the commit https://github.com/qos-ch/logback-access/commit/c9447c53b5919d8 fixes it for Jetty also 👍
It also works together with the Support for logback-access 2.0.0 PR for logstash-logback-encoder (yet to be merged at time of writing)
Fixed in logback-access version 2.0.2 which was released on 2024-07-08.
Logback 1.5.6 does not work using included resources for Tomcat access logs
From startup.
11:19:28,784 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Found [logback-access.xml] as a resource. 11:19:28,795 |-INFO in ch.qos.logback.access.common.model.processor.ConfigurationModelHandler - debug attribute not set 11:19:28,795 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@78a287ed - Adding [jar:file:/C:/Users/p950rhw/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/3.3.0/83d42f81f312d71b9425f58d1d3f9e8970e51b22/spring-boot-3.3.0.jar!/org/springframework/boot/logging/logback/defaults.xml] to configuration watch list. 11:19:28,795 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@7b4619a3 - URL [jar:file:/C:/Users/p950rhw/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/3.3.0/83d42f81f312d71b9425f58d1d3f9e8970e51b22/spring-boot-3.3.0.jar!/org/springframework/boot/logging/logback/defaults.xml] is not of type file 11:19:28,799 |-ERROR in ch.qos.logback.core.model.processor.IncludeModelHandler - null configurator supplier. Abandoning inclusion of [org/springframework/boot/logging/logback/defaults.xml] 11:19:28,799 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@78a287ed - Adding [file:/C:/ws/git/lib-logging/bin/main/andromeda-access-console-appender.xml] to configuration watch list. 11:19:28,801 |-ERROR in ch.qos.logback.core.model.processor.IncludeModelHandler - null configurator supplier. Abandoning inclusion of [andromeda-access-console-appender.xml] 11:19:28,801 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@78a287ed - Adding [file:/C:/ws/git/lib-logging/bin/main/andromeda-access-observability-appender.xml] to configuration watch list. 11:19:28,803 |-ERROR in ch.qos.logback.core.model.processor.IncludeModelHandler - null configurator supplier. Abandoning inclusion of [andromeda-access-observability-appender.xml] 11:19:28,803 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@78a287ed - Adding [file:/C:/ws/git/lib-logging/bin/main/andromeda-access-logread-appender.xml] to configuration watch list. 11:19:28,806 |-ERROR in ch.qos.logback.core.model.processor.IncludeModelHandler - null configurator supplier. Abandoning inclusion of [andromeda-access-logread-appender.xml] 11:19:28,806 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@9d3a7a1 - End of configuration. 11:19:28,806 |-INFO in ch.qos.logback.access.common.joran.JoranConfigurator@1c411474 - Registering current configuration as safe fallback point
The configuration supplier ends up being null.
This works fine with Spring boot 3.2.5 and logback 1.4.14 with but not with Spring boot 3.3.0 and logback 1.5.6