Enabling SQL logging in JIRA
Similar to access logs, another useful piece of logging, especially when debugging an issue, is SQL logging. In this recipe, we will see how to turn on SQL logging.
How to do it...
In JIRA5, SQL logging can be turned on from the user interface at Administration | System | Troubleshooting and Support... | Logging & Profiling, as shown here:
Just like access logs, the changes are temporary and will be reverted back in the next restart. Permanent changes can be made in the WEB-INF/classes/log4j.properties
file, although it is not recommended. In this case, the logging entry to be modified is as follows:
log4j.logger.com.atlassian.jira.ofbiz.LoggingSQLInterceptor = OFF, sqllog log4j.additivity.com.atlassian.jira.ofbiz.LoggingSQLInterceptor = false log4j.logger.com.atlassian.jira.security.xsrf.XsrfVulnerabilityDetectionSQLInterceptor = OFF, xsrflog log4j.additivity.com.atlassian.jira.security.xsrf.XsrfVulnerabilityDetectionSQLInterceptor = false
The latter logs the...