logging-log4j2 icon indicating copy to clipboard operation
logging-log4j2 copied to clipboard

Mark `log4j-spring-boot` as Spring Boot 2 only in the docs

Open ramanathan1504 opened this issue 1 week ago • 1 comments

The documentation does not say that log4j-spring-boot targets Spring Boot 2 only:

  • The Log4j Spring Boot Support page says it provides "enhanced support for Spring Boot beyond what Spring Boot itself provides".
  • The SpringPropertySource row gives the module as log4j-spring.
  • log4j2.disableCloudConfigLoggingSystem is described as disabling Log4j2CloudConfigLoggingSystem, which is now Log4j2SpringBootLoggingSystem.

Spring Boot 3 and later provide the spring lookup, the SpringProfile arbiter and the Environment property source themselves. With Spring Boot 4, keeping the module fails at startup: NoSuchMethodError on 4.0.0–4.0.3, and IllegalAccessError from 4.0.4 (spring-projects/spring-boot#49703).

To reproduce: add log4j-spring-boot to a Spring Boot 4.x application that uses spring-boot-starter-log4j2, then start it.

ramanathan1504 avatar Nov 26 '26 14:11 ramanathan1504

I have submitted PR #4541 addressing this issue.

The changes clarify the Spring Boot 2.x compatibility of log4j-spring-boot and fix the related module and class references in the documentation.

Thanks for reporting this!

yashdotdev13 avatar Nov 30 '26 18:11 yashdotdev13