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 plugin configuration, you can enable additional logging under the Security for Bitbucket Settings heading by toggling the Enable additional logging switch.

Security for Bitbucket Settings page, with a switch labeled Enable additional logging, just above the Global Scanning Rules heading.

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:

CODE
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/net.java.ao.sql/debug
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:

CODE
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/net.java.ao.sql/info
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.