Provide an Apache Commons Logging's LogFactory provider in spring-jcl to support WebSphere's Parent-First classloader [SPR-15903] #20457
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Ibrahim Ghazal opened SPR-15903 and commented
In #19081 (specifically this comment), Juergen Hoeller said:
In practice, there is a difference. When a real Commons Logging JAR is picked up (such as when using WebSphere's Parent-First classloader),
spring-jcl
is not used and spring's logs end up going to Commons Logging's default implementation (most likely JUL). But whenlog4j-jcl
orjcl-over-slf4j
are used instead ofspring-jcl
, logs are redirected to Log4j2 or SLF4J respectively.This is because Commons Logging searches for a provider using the JAR Services Discovery mechanism (
META-INF/services/org.apache.commons.logging.LogFactory
file). Bothlog4j-jcl
andjcl-over-slf4j
provide this and so they just work even in such situations.I think it's quite easy to provide this in
spring-jcl
too.(The linked comment above mentions implementing the discovery mechanism in
spring-jcl
, but this issue is asking for the opposite (providing a provider)).Affects: 5.0 RC3
Issue Links:
Referenced from: commits 0b86c71
The text was updated successfully, but these errors were encountered: