[Logging Wiki] Update of "Log4j2AndHibernate4" by Stefa nBodewig

Apache Wiki <[email protected]> Mon, 13 Oct 2014 15:53:54 -0000
Newsgroups gmane.comp.apache.logging
Message-ID <[email protected]>
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Logging Wiki" for change notification.

The "Log4j2AndHibernate4" page has been changed by StefanBodewig:
https://wiki.apache.org/logging/Log4j2AndHibernate4?action=diff&rev1=1&rev2=2

Comment:
typo spetted by Dominik Psenner

   * add the log4j 2.x slf4j binding and slf4j-api to your classpath as well and set the system property `org.jboss.logging.provider` to `slf4j` - setting the property explicitly bypasses the "logback is there" check
   * override Hibernate's dependency to use jboss-logging 3.2.0.Beta1, add the log4j 1.x logging bridge to your classpath as well and set the system property `org.jboss.logging.provider` to `log4j` - this doesn't seem to work with any 3.1.x version of jboss-logging
  
- Things get even more complex if you add a non-default connection pool to Hibernate.  c3p0 prior to 0.9.5pre2 will only log to log4j 1.x so using the log4j 1.x logging bridge is your only option.  Later versions of c3po added support for slf4j as well.
+ Things get even more complex if you add a non-default connection pool to Hibernate.  c3p0 prior to 0.9.5pre2 will only log to log4j 1.x so using the log4j 1.x logging bridge is your only option.  Later versions of c3p0 added support for slf4j as well.