I'm trying simply to get the values that Hibernate is binding to the queries behind the question marks "?" on JBoss 7.
So I'm editing standalone/configuration/logging.properties
in order to add this :
logger.org.hibernate=DEBUG
logger.org.hibernate.type=ALL
But I get nothing in my console, nor in the log file... what am I missing ?
Wow, it's not really like the previous versions... I've finally found the offical way to configure JBoss 7 logging and the logging configuration of Hibernate 4 !
What you have to do is edit
standalone/configuration/standalone.xml
(the configuration file of yourdomain
) and search for the<subsystem xmlns="urn:jboss:domain:logging:1.1">
tag.Then in the
<console-handler name="CONSOLE"
, I've switched the level information to TRACE (<level name="TRACE"
) and added the<logger category="org.hibernate">
.Here is the partial XML :
I've found another and better (because it logs all the JDBC method calls, not only basic binding) solution from a blog post: add
spy="true"
in the<datasource>
declaration andTRACE
logs from categoryjboss.jdbc.spy
:and the logger (in
<subsystem xmlns="urn:jboss:domain:logging:1.1">
):