On this page:

Atlassian Support will almost always ask for the atlassian-confluence.log from the confluence-home/logs directory. In Confluence 3.1 and later, you can access the logs from the Confluence Administration Console in the application, via the Support Utility. Otherwise, the easiest way to find this location is to look for the "Confluence Home" setting from Administration > System Information. If you can't access Administration > System Information, check <confluence-install>/confluence/WEB-INF/classes/confluence-init.properties and look for the confluence.home setting, then find the logs in that directory.

Logs Location

This section describes Confluence's default logging behaviour, assuming that you have not changed the destination of the logs. So as to unify logging across different application servers, Confluence uses the atlassian-confluence.log, not the application server log, as it's primary log.

For Confluence 2.6.x and earlier, the default behaviour is:

  • For Confluence Standalone, log entries are written to <confluence_install>/logs. The main log file is called atlassian-confluence.log.
  • For Confluence EAR/WAR, log entries are written to the application server logs, i.e. the default log files of the application container.

For Confluence 2.7.x and later, both Standalone and EAR/WAR distributions follow the same default behaviour:

  • When you start Confluence, log entries will be sent to the application server logs until Confluence has completed its initial bootstrap. Any log entries written to the console will be repeated into the <confluence-home> log described below.
  • Once the initial startup sequence is complete, all logging will be to <confluence-home>/logs/atlassian-confluence.log. For example: c:/confluence/data/logs/atlassian-confluence.log.
    (info) Note that the default location is now the Confluence home directory instead of the application server's log file. The home directory is specified in <confluence-install>/confluence/WEB-INF/classes/confluence-init.properties.

背景

Confluence では、Apache の log4j ログ記録サービスを使用しています。これによって、開発者または管理者は、アプリケーション バイナリに触ることなく、設定ファイルを編集することで、ログ記録の動作やログ出力ファイルを制御することができます。log4j のログ レベルは6つあります。

ログ設定ファイルの場所

Confluence's logging behaviour is defined in the following properties file:
<CONFLUENCE-INSTALL>/confluence/WEB-INF/classes/log4j.properties

このファイルは、Apache の log4j ドキュメントに記載されているような、標準的な log4j 設定ファイルです。

ログ ファイルの出力先の変更

用語: log4j では、出力先を「アペンダ」と呼びます。

To change the destination of the log files, you need to stop Confluence and then change the settings in the 'Logging Location and Appender' section of the log4j.properties file. The location of this file is described above.

In the standard properties file supplied with Confluence 2.7 and later, you will find entries for two appenders:

  • com.atlassian.confluence.logging.ConfluenceHomeLogAppender – This is a custom appender which controls the default logging destination described above. This appender allows the following settings:
    • MaxFileSize
    • MaxBackupIndex
  • org.apache.log4j.RollingFileAppender - 異なる場所にログを出力する場合、RollingFileAppender 行のコメント化を解除し、その下の行で出力ファイルを変更します。ConfluenceHomeLogAppender を参照する、手前の行をコメントアウトします。

Confluence には log4j の提供するアペンダの完全なスイートが同梱されています。アペンダの詳細については、log4j のドキュメントを参照してください。

ログ レベルの変更

Confluence のログ設定を変更する方法の説明については、「ログ作成の設定」を参照してください。

一部の特定の Confluence ログ オプションの使用

このセクションには、必要になるかもしれない特定のログ設定に関するアドバイスがいくつか含まれています。

データベースに対する SQL リクエストの詳細のログ記録

データベースに送信される個々の SQL リクエストを記録できるように、Confluence のログを増やすことができます。これは特定の問題のトラブルシューティングに役立ちます。

2つの方法で、詳細な SQL のログ記録を有効化できます。

  • 実行時 - 上記の手順を参照してください。
  • ログ記録のプロパティ ファイルを使用 - 詳細な手順を参照してください。

各 Confluence ページへのユーザーの参照/アクセスの詳細のログ記録

ユーザーが Confluence 内のどのページにアクセスしているかを示すようにログを設定することができます。これは、ログ記録のプロパティ ファイルの介してのみ利用可能です。詳細な手順を参照してください。

Where are my Thread Dumps?

Thread dumps are logged to the application server log file.

関連トピック