Skip to content

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

Closed

Description

@spring-projects-issues

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

Activity

  1. spring-projects-issues commented on Mar 8, 2010

    @spring-projects-issues
    CollaboratorAuthor

    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.

  2. spring-projects-issues commented on Oct 20, 2011

    @spring-projects-issues
    CollaboratorAuthor

    Andrew Muraco commented

    SLF4J provides a tool to automate most of the actual changeover, It'd just be testing & documentation of the change.

  3. spring-projects-issues commented on May 15, 2014

    @spring-projects-issues
    CollaboratorAuthor

    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

  4. spring-projects-issues commented on Nov 20, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Hendy Irawan commented

    Original ticket: #10000

  5. added
    status: declined
    type: enhancement
    in: core
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: corestatus: declinedtype: enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions