Skip to main content
Skip table of contents

Enabling debug logging

Should you have issues with Security for Bitbucket, turning on debug logging can help to troubleshoot and diagnose them.

Additional Logging Setting

In the setting page, you can enable additional logging by toggling the Enable additional logging switch:

This makes all Debug and Info level messages log as Warn messages on all nodes until the setting is turned off.

Interaction With Bitbucket Logging Configuration

Bitbucket allows more granular configuration of logging. Soteri recommends using the “Enable additional logging” setting to troubleshoot any issue with Security for Bitbucket. However, if for any reason you decide to use the Bitbucket logging configuration, it will not conflict with the Additional Logging Setting.

Enabling logging for database SQL commands

Logging all SQL commands will generate extremely verbose logs. It should only be enabled temporarily, at the instruction of our support team.

Similar to turning on debug logging for the Security for Bitbucket plugin, trace level logging to see raw SQL commands to the Bitbucket database can be enabled by setting the log level for the following packages:

curl -X PUT -u admin https://{bitbucket.server}/rest/api/latest/logs/logger/org.hibernate.sql/debug
curl -X PUT -u admin https://{bitbucket.server}/rest/api/latest/logs/logger/
curl -X PUT -u admin https://{bitbucket.server}/rest/api/latest/logs/logger/com.querydsl.sql/debug

and can be undone by setting the log levels back to info:

curl -X PUT -u admin https://{bitbucket.server}/rest/api/latest/logs/logger/org.hibernate.sql/info
curl -X PUT -u admin https://{bitbucket.server}/rest/api/latest/logs/logger/
curl -X PUT -u admin https://{bitbucket.server}/rest/api/latest/logs/logger/com.querydsl.sql/info
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.