The class org.jboss.logging.LoggerProviders checks for the presence of log4j using the code:
However, despite having the log4j-1.2-api-2.0.jar bridge included, this fails as the class org.apache.log4j.Hierarchy is not present in log4j 2.0.
I worked around this by forcing JBoss logging to use slf4j (which is then proxied to log4j) by setting the -Dorg.jboss.logging.provider=slf4j option.
As a proper fix, however, how about checking for a class that is included in log4j 1.2, 2.0 but not slf4j? org.apache.log4j.config.PropertySetter seems to tick the box.
I tested changing the afore mentioned method to:
And indeed I started receiving logging messages from Hibernate (via JBoss logging.)