Confluence : Enabling detailed Hibernate logging
This page last changed on Jan 09, 2007 by ivan@atlassian.com.
These instructions increase Confluence's logging to report individual requests being sent to the database by Hibernate. It is useful for troubleshooting:
To do this in Confluence, you need to modify log4j.properties, located in confluence/WEB-INF/classes.
To log SQL queriesStop Confluence, then uncomment the following lines in log4j.properties: ## log hibernate prepared statements/SQL queries (equivalent to setting 'hibernate.show_sql' to 'true') log4j.logger.net.sf.hibernate.SQL=DEBUG, confluencelog log4j.additivity.net.sf.hibernate.SQL=false To log SQL queries with parametersStop Confluence, then uncomment the following lines in log4j.properties: ## log hibernate prepared statement parameter values log4j.logger.net.sf.hibernate.type=DEBUG, confluencelog log4j.additivity.net.sf.hibernate.type=false To disable batched updates (for simpler debugging)Stop Confluence, then edit confluence/WEB-INF/classes/databaseSubsystemContext.xml and uncomment the following <prop> line: <!-- it can be useful to disable batching during debugging, as HSQLDB doesn't report the exact statement which fails in batch mode --> <prop key="hibernate.jdbc.batch_size">0</prop> |
![]() |
Document generated by Confluence on Mar 22, 2007 20:59 |