Streamline and harden `Log4J2LoggingSystem` by delegating more
functionality. The commit makes updates in two key areas:
Previously, each method fetched the `LoggerContext` directly from
`LogManager` and cast it to `....core.LoggerContext`. This approach
has several issues:
* ClassCastException risks:
- When Log4j Core is on the classpath but not the active implementation
(e.g. when `log4j-to-slf4j` is used).
- During shutdown, when `LogManager` may return a `SimpleLoggerContext`
(see spring-projects/spring-boot#26953).
* Unexpected reinitialization:
- If the logger context had already been stopped, `Log4J2LoggingSystem`
would trigger creation of a new context, even mid-shutdown.
Configuration file detection was previously hardcoded in
`Log4J2LoggingSystem`, which limited flexibility:
* Harder to support additional configuration formats.
* Coupled Spring Boot to internal Log4j Core classes such as
`AuthorizationProvider`.
This change now delegates configuration resolution to Log4j. This reduces
reliance on internal APIs and allows Log4j Core to handle configuration
formats and factories more naturally.
Signed-off-by: Piotr P. Karwasz <piotr@github.copernik.eu>
See gh-47424
* pr/46213:
Polish 'Introduce a shared abstraction for database initialization'
Introduce a shared abstraction for database initialization
Closes gh-46213
Add a new shared abstraction used by Spring Batch,
Spring Integration, Spring Session and Quartz.
See gh-46213
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit handles a corner case where we have to add properties in
a release that represents something we mean to remove but that's not
ready to go away just yet.
Those properties are now considered in the changelog, but marked as
deprecated.
Closes gh-47759
This commit migrates from Dokkatoo to Dokka for generation of Kotlin
API documentation.
See gh-47706
Signed-off-by: Varun Patni <varun.patni1@gmail.com>