Skip to main content
Skip table of contents

Enabling debug logging

Enabling debug logging for Security for Bitbucket

Commands to enable debug logging

CODE
curl -u admin -v -X PUT https://{bitbucket.server}/rest/api/latest/logs/logger/io.soteri/debug

where

  • admin is your Bitbucket admin user (you’ll be prompted for a password), and

  • bitbucket.server is the URL of your Bitbucket server.

If the command is successful, you will see a log line like this in the Bitbucket logs:

CODE
[INFO] 2020-08-31 17:41:24,555 WARN  [hz.hazelcast.event-3]  io.soteri Switching to log level [debug]

Commands to disable debug logging

CODE
curl -u admin -v -X PUT https://{bitbucket.server}/rest/api/latest/logs/logger/io.soteri/warn

This command is identical to the first one, except with warn instead of debug at the end.

Enabling trace logging for database SQL commands

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/trace
curl -X PUT -u admin https://{bitbucket.server}/rest/api/latest/logs/logger/net.java.ao.sql/trace
curl -X PUT -u admin https://{bitbucket.server}/rest/api/latest/logs/logger/com.querydsl.sql/trace

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.