How to Enable SQL Logging in Crowd
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
To enable detailed SQL logging in Crowd, you need to modify log4j.properties
, located in <crowd-installation-directory>/
crowd-webapp/WEB-INF/classes
.
If you require support assistance with a database-related problem, it is advisable to enable detailed SQL logging before sending us the log files. This will assist us in determining what SQL queries were running during the reported problem.
Solution
To Log SQL Queries with Parameters
Stop Crowd
Add the following lines to the end of the
log4j.properties
file:1 2 3 4
## Log hibernate prepared statements/SQL queries (equivalent to setting 'hibernate.show_sql' to 'true') log4j.logger.org.hibernate.SQL=DEBUG log4j.logger.org.hibernate.type=TRACE log4j.appender.crowdlog.Threshold=TRACE
Start Crowd
Was this helpful?