Using Log4J2 with Hibernate 4


I was trying to use Hibernate 4.3.8.Final with Log4J2 and I spent some hours to find why Hibernate was not using Log4J2 though it was declared in my pom.xml file.

Actually, I hit issue JBLOGGING-107.

The workaround is simply to add a more recent jboss-logging dependency than the one shipped by default with Hibernate 4.3.8.Final.


David Pilato

20+ years of experience, mostly in Java. Living in Cergy, France.