Enable debug logging for Favorites

This page describes how to enable debug-level logging for Favorites in Bitbucket Server and Data Center.

Favorites for Bitbucket logs can be found in <Bitbucket home directory>/log/atlassian-bitbucket-favorites.log


Enabling debug logging at runtime

To enable debug logging for the Favorites logger once Bitbucket has been started, run the following command in a terminal:

curl -u <ADMIN_USERNAME> -v -X PUT -d "" -H "Content-Type: application/json" <BASE_URL>/rest/api/latest/logs/logger/eu.asksoftware.bitbucket.favorites/debug
 
# e.g.
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/logger/eu.asksoftware.bitbucket.favorites/debug

Favorites will write debug logging in the Bitbucket Logs, located in <Bitbucket home directory>/log.

If debug logging is enabled with success, the following line should be in your atlassian-bitbucket.log

eu.asksoftware.bitbucket.favorites Switching to log level [debug]


Disabling debug logging

The debug logging is automatically disabled after restarting Bitbucket. Otherwise, debug logging can be reset using the following command

curl -u <ADMIN_USERNAME> -v -X PUT -d "" -H "Content-Type: application/json" <BASE_URL>/rest/api/latest/logs/logger/eu.asksoftware.bitbucket.favorites/info
 
# e.g.
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/logger/eu.asksoftware.bitbucket.favorites/info

If debug logging is disabled with success, the following line should be in your atlassian-bitbucket.log

eu.asksoftware.bitbucket.favorites Switching to log level [info]