Bitbucket Server のデバッグ ログ
このページでは、Bitbucket Server でさまざまなタイプのデバッグレベルのログ作成を有効化する方法について説明します。
Bitbucket Server logs can be found in <Bitbucket home directory>/log
.
On this page
Bitbucket Server インスタンスでのデバッグ ログ作成
このセクションでは、Bitbucket Server でデバッグ レベルのログ作成を有効化する方法について説明します。
UI 経由でデバッグ ログ作成を有効化する
起動時にデバッグ ログ作成を有効化する
To enable debug logging whenever Bitbucket Server is started, edit the <Bitbucket home directory>/shared/bitbucket.properties
file (if this file doesn't exist then you should create it) and add these two lines:
logging.logger.ROOT=DEBUG
logging.logger.com.atlassian.bitbucket=DEBUG
If your Bitbucket Server instance is earlier than version 3.2, the bitbucket.properties
file is at the top level of the Bitbucket Server home directory.
実行中にデバッグ ログ作成を有効にする
Bitbucket Server の起動後にルート ロガーのデバッグ ログ作成を有効にするには、ターミナルで 2 つのコマンドを実行します。
curl -u <ADMIN_USERNAME> -v -X PUT -d "" -H "Content-Type: application/json" <BASE_URL>/rest/api/latest/logs/rootLogger/debug
curl -u <ADMIN_USERNAME> -v -X PUT -d "" -H "Content-Type: application/json" <BASE_URL>/rest/api/latest/logs/logger/com.atlassian.bitbucket/debug
# e.g.
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/rootLogger/debug
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/logger/com.atlassian.bitbucket/debug
特定のロガーに対するデバッグ ログ作成を有効にするには、ターミナルで次のコマンドを実行します。
curl -u <ADMIN_USERNAME> -v -X PUT -d "" -H "Content-Type: application/json" <BASE_URL>/rest/api/latest/logs/logger/<LOGGER_NAME>/debug
# e.g. embedded Crowd debug log
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/logger/com.atlassian.crowd/debug
# e.g. LDAP debug log
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/logger/com.atlassian.crowd.directory.SpringLDAPConnector/DEBUG
# e.g. email debug log
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/logger/bitbucket.mail-log/debug
Bitbucket Server インスタンスのプロファイル ログ作成
このセクションでは、Bitbucket Server でプロファイルを有効化する方法について説明します。このログは、パフォーマンスの問題をトラブルシューティングする際に必須です。
UI からプロファイルのログ作成を有効化する
詳細なトレース情報を有効化するには、Bitbucket Server の管理領域に移動し、[サポート] 配下の [ログとプロファイリング] を選択して、[プロファイル作成を有効化] を選択します。
クライアントでの Git オペレーションのデバッグ ログ作成
Atlassian Support might request debug logs for Git operations (on the client) when troubleshooting issues. You can enable debug logging on the Git client by setting the following variables. If you are using HTTP/S, remove the Authorization
header from the output, as it contains your Basic-Auth information. Atlassian provides a set of scripts that simplify the collection of Git client debug information.
Linux の場合
Git コマンドを実行する前に、コマンド ラインで以下を実行します。
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
To measure the length of time a command takes to complete, use the time
utility/command prior to the actual git command. For example, to test a push to branch "master":
time git push origin master
Windows の場合
Git コマンドを実行する前に、コマンド ラインで以下を実行します。
set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1
Setting GIT_CURL_VERBOSE
is only useful for connections over HTTP/S since SSH doesn't use the libcurl
library.
Bitbucket Server Backup Client のデバッグ ロギング
アトラシアン サポートでは問題のトラブルシューティングを行う際に、Backup クライアントのデバッグ ログを依頼する場合があります。
To enable debug logging for the Backup client, add a file named logback.xml
to your working directory (pwd
) with the following content:
<included><logger name="com.atlassian.bitbucket" level="DEBUG"/></included>
デバッグ ログ作成を有効化するには、Bitbucket Server の管理領域に移動し、[サポート] 配下の [ログとプロファイル] を選択し、[デバッグ ログ作成を有効化] を選択します。