[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2696) Consider migrating to slf4j

Koda Janh (JIRA) noreply at atlassian.com
Fri Jun 29 09:43:52 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27346 ] 

Koda Janh commented on HHH-2696:
--------------------------------

slf4j does not include MDC/NDC support directly because it is a simple logging facade and not all implementations of that facade support MDC/NDC.

Still, all is not lost. Logback, a slf4j implementation, has MDC support: http://logback.qos.ch/manual/mdc.html
You could depend on slf4j for 99% of your operations (portable) with a dependency on logback for MDC (not portable).

Even without MDC/NDC slf4j provides benefits compared to commons-logging. One of the most annoying issues (you are probably familiar with) is using log4j under Tomcat. You end up with classloader hell and those wonderful ThreadDeath errors on redeploy. If you remove the log4j dependency this should go away.

> Consider migrating to slf4j
> ---------------------------
>
>                 Key: HHH-2696
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2696
>             Project: Hibernate3
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.2.4
>            Reporter: Koda Janh
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> Please consider migrating away from commons-logging and onto slf4j for the reasons mentioned here: http://www.qos.ch/logging/classloader.jsp
> The author of log4j went on to write "logback" which is an implementation of slf4j that has much better performance than log4j and much cleaner output. I recommend you evaluate these alternatives seriously and consider them for future releases of Hibernate.
> To ease migration you could use the "log4j bridge" mentioned here: http://logback.qos.ch/bridge.html
> You simply replace log4j's jar by the bridge jar and all log4j method calls get redirected to logback under the hood.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list