Skip to content

Migrate logger from commons-logging to slf4j (remove commons-logging dependency) [SPR-6607] #11273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Dec 23, 2009 · 4 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 23, 2009

Alexandre Navarro opened SPR-6607 and commented

Migrate logger from commons-logging to slf4j (remove commons-logging dependency) because commons-logging has classloading problems


Affects: 3.0 GA

Issue Links:

6 votes, 5 watchers

@spring-projects-issues
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

spring-projects-issues commented Nov 20, 2014

Hendy Irawan commented

Original ticket: #10000

@spring-projects-issues spring-projects-issues added status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants