How to enable HTTP wire debug logging in Bitbucket Server
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The wire log records all data transmitted to and from servers when executing HTTP requests. It uses the org.apache.http.wire
logging category. This log should only be enabled to debug problems, as it will produce a huge amount of log data.
This article is an extension of the Bitbucket Enable debug logging documentation.
Environment
Bitbucket 6, 7, 8, 9
Solution
To enable debug logging for the org.apache.http.wire logger, run this command in a terminal:
curl -u <ADMIN_USERNAME> -v -X PUT -d "" -H "Content-Type: application/json" <BASE_URL>/rest/api/latest/logs/logger/org.apache.http.wire/debug
# e.g.
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://192.168.1.21:7990/rest/api/latest/logs/logger/org.apache.http.wire/debug
Disable
To disable debug logging for the org.apache.http.wire logger, run this command in a terminal:
curl -u <ADMIN_USERNAME> -v -X PUT -d "" -H "Content-Type: application/json" <BASE_URL>/rest/api/latest/logs/logger/org.apache.http.wire/warn
# e.g.
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://192.168.1.21:7990/rest/api/latest/logs/logger/org.apache.http.wire/warn