I was able the get the below log
Hibernate: insert into ORGANIZATIONALUNITCATALOG (ID, SYSTEMID) values (null, ?)
[main] DEBUG org.hibernate.type.LongType - binding '0' to parameter: 1
after specifying the log4j 开发者_开发问答properties as
log4j.logger.org.hibernate.sql=DEBUG
log4j.logger.org.hibernate.type=DEBUG
Is there a way to tell hibernate 3.2.x to show the binding column name instead of the column number? i.e. I'd like to see the log line as
[main] DEBUG org.hibernate.type.LongType - binding '0' to parameter: SYSTEMID
log4j.logger.org.hibernate.type=TRACE
should do it.
If you still have problems, try enabling trace on these too
log4j.logger.org.hibernate.SQL=TRACE
log4j.logger.org.hibernate.engine.query=TRACE
log4j.logger.org.hibernate.jdbc=TRACE
In addition make sure you have TRACE logging enabled in your config. Many times default config files will set logging at DEBUG as the lowest.
Use log4j.logger.org.hibernate=debug
精彩评论