Announcement Announcement Module
Collapse
No announcement yet.
Remove Commons Logging in favor of Log4j 1.3 UGLI Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I'm having issues with logging in my new Spring MVC based web app on Tomcat 5.5.9.

    I vote for removing JCL use in Spring. Perhaps Spring should eat its own dog food and have the logging implementation injected into it.

    Comment


    • #17
      Slightly OT: Using jcl104-over-slf4j instead of commons-logging in an maven2 environ.

      I migrated my applications to slf4j-log4j12 and now wanted to eliminate the dependency for jcl by using jcl104-over-slf4j (for all "legacy" applications ;-)). But unfortunately it seems there is now way to tell maven2 to ignore the dependency for jcl. If you want to do this, you have to define an jcl-exclude for any dependency in your project. Does someone has a better idea?

      Comment


      • #18
        ojs, slf4j final has been released. Maybe it works now?

        http://www.slf4j.org/

        Comment


        • #19
          I just discovered SLF4J and spent a bit of time reading up on it. For one thing, I much prefer their logging API - no need for "if (log.isXyzEnabled()) { ... }" statements anymore. I also quite like that it's straight-forward and only uses the logging implementation for the JAR you include in your app - I really don't see the point of JCL's dynamic discovery features.

          Just read the discussion under the SLF4J 1.0 final release over on TheServerSide. Strangely, noone seems to get it? Oh well.... I also never understood what was wrong with JCL until I encountered a setup with tens of applications, and hundreds of J2EE modules, legacy code, and a custom JCL logger implementation to boot.

          That said, I think that version 1.0 is a bit early to adopt such a disruptive change - especially in something the size and footprint of Spring, it might be rather irresponsible even.

          Comment


          • #20
            Originally posted by lumpynose
            ojs, slf4j final has been released. Maybe it works now?

            http://www.slf4j.org/
            No, unfortunately not. I'm not even sure if it is possible for slf4j to define such an exclude in its pom.

            Comment


            • #21
              But JCL isn't a logging implementation...

              Originally posted by jbetancourt
              I vote for removing JCL use in Spring. Perhaps Spring should eat its own dog food and have the logging implementation injected into it.
              JCL is an abstraction layer, not an implementation. The sole purpose of JCL is to decouple your app from any specific logging implementation. So by using JCL, Spring is already eating its own dog food. Or would you have Spring reinvent the wheel by providing its own logging abstraction layer?

              Andrew

              Comment


              • #22
                Excellent point. However, in this case reinventing the wheel may make sense.
                Spring could have used other stuff too, like commons BeanUtils, but it does its own.

                Though, if the latest commons logging fixed the reported problems, there is no need.

                Comment

                Working...
                X