Confluence uses Apache's log4j logging service. This allows a developer or administrator to control the logging behavior and the log output file by editing a configuration file, without touching the application binary. There are six known log4j logging levels.
If you request help from Atlassian Support, we will almost always ask for the atlassian-confluence.log
from the confluence-home/logs
directory. You can access the logs from the Confluence Administration Console, via the support tool. If you cannot access the Confluence Administration Console, check the properties file at <confluence-installation>/confluence/WEB-INF/classes/confluence-init.properties
, look for the confluence.home
setting in that file, then find the logs in the Confluence home directory.
This section describes Confluence's default logging behaviour, assuming that you have not changed the destination of the logs. In order to unify logging across different application servers, Confluence uses the atlassian-confluence.log
as its primary log, not the application server log.
Both the Confluence and Confluence EAR/WAR distributions follow the same default behaviour:
<confluence-home>/logs/atlassian-confluence.log
. For example: c:/confluence/data/logs/atlassian-confluence.log
.Note that the default location is the Confluence home directory, not the application server's log file. The home directory is specified in <confluence-installation>/confluence/WEB-INF/classes/confluence-init.properties
.
Confluence's logging behaviour is defined in the following properties file:
<CONFLUENCE-INSTALL>/confluence/WEB-INF/classes/log4j.properties
This file is a standard log4j configuration file, as described in the Apache log4j documentation.
Terminology: In log4j, an output destination is called an 'appender'.
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, 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:org.apache.log4j.RollingFileAppender
– If you want to log to a different location, uncomment the RollingFileAppender
line and change the destination file in the line below it. Comment out the previous lines referring to the ConfluenceHomeLogAppender
.Confluence ships with the full suite of appenders offered by log4j. Read more about appenders in the log4j documentation.
See Configuring Logging for instructions on how to change the logging configuration of Confluence.
This section contains some pointers to specific log configurations you may need.
You may want to increase Confluence's logging so that it records individual SQL requests sent to the database. This is useful for troubleshooting specific problems.
You can enable detailed SQL logging in two ways:
You can configure the log to show which users are accessing which pages in Confluence. This can only be done via the logging properties file – see the detailed instructions.
Confluence provides an inbuilt log scanner that will check your Confluence logs for errors and attempt to match them against known issues in our knowledge base and bug tracker. See Troubleshooting Problems and Requesting Technical Support.
Important Directories and Files
Enabling Detailed SQL Logging
Enabling user access logging
Generating a Thread Dump
Enabling Page Request Profiling
Troubleshooting Problems and Requesting Technical Support