You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrate logger from commons-logging to slf4j (remove commons-logging dependency) [SPR-6607] #11273
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Please consider this move. It's been rejected in the past for 'backwards compatibility' concerns, however, those who need backwards compatibility can use the slf4j-commons-logging brdige.
The slf4j-api is far superior to commons-logging. It provides parameterized logging, a wider choice of underlying frameworks, no classloading issues, and is a blessing for those who are unfortunate enough to run websphere.
Hibernate and EHCache have moved to SLF4j, Spring Framework should follow suit.
At this point, we're not going to migrate our logging API use to SLF4J anymore. SLF4J is commonly used with Spring, through the Commons Logging bridge... But SLF4J has further competition now, with Hibernate having migrated to JBoss Logging, Log4J 2 about to be released, etc.
And just to correct the assumption above, our backwards compatibility concern is not with existing Commons Logging setup, it's with existing code calling into the logger references that Spring base classes are exposing. Switching the logger interface would break all existing subclasses outside of our control, in particular the pre-compiled ones from third-party libraries. That's a pill we'd only swallow for a major gain... and for Spring's own purposes, Commons Logging is still alright. Applications can decide to use SLF4J or Log4J 2 or whatever in their own code anyway.
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Activity
spring-projects-issues commentedon Mar 8, 2010
Jon Fisher commented
Please consider this move. It's been rejected in the past for 'backwards compatibility' concerns, however, those who need backwards compatibility can use the slf4j-commons-logging brdige.
The slf4j-api is far superior to commons-logging. It provides parameterized logging, a wider choice of underlying frameworks, no classloading issues, and is a blessing for those who are unfortunate enough to run websphere.
Hibernate and EHCache have moved to SLF4j, Spring Framework should follow suit.
spring-projects-issues commentedon Oct 20, 2011
Andrew Muraco commented
SLF4J provides a tool to automate most of the actual changeover, It'd just be testing & documentation of the change.
spring-projects-issues commentedon May 15, 2014
Juergen Hoeller commented
At this point, we're not going to migrate our logging API use to SLF4J anymore. SLF4J is commonly used with Spring, through the Commons Logging bridge... But SLF4J has further competition now, with Hibernate having migrated to JBoss Logging, Log4J 2 about to be released, etc.
And just to correct the assumption above, our backwards compatibility concern is not with existing Commons Logging setup, it's with existing code calling into the logger references that Spring base classes are exposing. Switching the logger interface would break all existing subclasses outside of our control, in particular the pre-compiled ones from third-party libraries. That's a pill we'd only swallow for a major gain... and for Spring's own purposes, Commons Logging is still alright. Applications can decide to use SLF4J or Log4J 2 or whatever in their own code anyway.
Juergen
spring-projects-issues commentedon Nov 20, 2014
Hendy Irawan commented
Original ticket: #10000