Confluence Docs 3.1 : Enabling detailed SQL logging
This page last changed on Jul 07, 2008 by smaddox.
Confluence uses the open source persistence framework Hibernate. This page tells you how to configure Confluence's logging to report individual SQL requests being sent to the database by Hibernate. It is useful for troubleshooting:
To enable detailed SQL logging 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 DebuggingStop Confluence, then edit databaseSubsystemContext.xml:
Uncomment the <prop> line in the following location: <!-- 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> RELATED TOPICS |
![]() |
Document generated by Confluence on Dec 10, 2009 18:46 |