Confluence 3.5 : Enabling Detailed SQL Logging
This page last changed on Dec 20, 2010 by richatkins.
Confluence uses the open source persistence framework Hibernate. This page tells you how to configure Confluence's logging to report individual SQL requests that are sent to the database by Hibernate. It is useful for troubleshooting the following events:
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 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=TRACE This needs to be done along with the changes to log SQL queries above (whether by the UI or by modifying the properties file). 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 Mar 16, 2011 18:52 |