Working with Confluence Logs
Confluence uses Apache's log4j logging service. This allows administrators to control the logging behavior and the log output file. There are six log4j logging levels.
If you request help from Atlassian Support, we will almost always ask for the Confluence application logs. The easiest way to get these logs is to go to Administration menu , then General Configuration. > Troubleshooting and support tools and follow the prompts to create a Support Zip.
On this page:
Related pages:
Application log files
By default, the application log files can be found in the <local-home>/logs
directory. This location is configurable, so you may need to check the log config for your location.
To make troubleshooting problems easier, the application log is split into several distinct log files:
- atlassian-confluence.log
This is the main application log file, most entries will be written here. When you start Confluence, any log entries written to the console will also be repeated in this log. - atlassian-confluence-index.log
This file contains entries related to the search index. - atlassian-confluence-outgoing-mail.log
This file contains entries related to outgoing mail, such as notifications. - atlassian-confluence-security.log
This file contains entries related to your users and user directories. - atlassian-synchrony.log
This file contains entries related to Synchrony, which powers collaborative editing. - atlassian-diagnostics.log
This file contains entries for an experimental diagnostics feature which provides alerts for things like low disk space and memory. - atlassian-confluence-jmx.log
This file contains entries for Java Management Extensions API metrics which allow you to monitor the status of your instance in real time. - atlassian-confluence-ipd-monitoring.log
This file contains entries for in-product diagnostics including database connectivity and HTTP connection metrics which helps with identifying performance issues in your infrastructure. - atlassian-confluence-migrations.log
This file contains entries related to migration to Cloud. atlassian-confluence-health-checks.log
This file contains details about issues and errors detected during the startup of your Confluence instance that need to be resolved.
In our documentation, when we refer to the "application log", we are referring to any of these files.
You can check the exact classes or packages that are logged to each file in the log4j.properties
file under LOGGING LOCATION AND APPENDER
.
Change the log file configuration
The logging behavior for Confluence and Synchrony 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.
Change the destination of the log files
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.
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. This appender allows the following settings:- MaxFileSize
- MaxBackupIndex
org.apache.log4j.RollingFileAppender
– If you want to log to a different location, uncomment theRollingFileAppender
line and change the destination file in the line below it. Comment out the previous lines referring to theConfluenceHomeLogAppender
.
The Synchrony log destination can also be changed in the same way in file.
Confluence ships with the full suite of appenders offered by log4j. Read more about appenders in the log4j documentation.
For more detailed information see Configuring log4j in Confluence to send specific entries to a different log file in our Knowledge Base.
Note: If you change the location of your log files, they will no longer be included when you generate a support zip. This means you'll need to attach your logs to any support requests manually.
Change the size and number of log files
By default, Confluence keeps 5 application log files, which are overwritten as they reach 20 MB.
You can change the default log size and the number of log files to keep by editing the following values in <CONFLUENCE-INSTALL>/confluence/WEB-INF/classes/log4j.properties
file.
log4j.appender.confluencelog.MaxFileSize=20480KB
log4j.appender.confluencelog.MaxBackupIndex=5
Change the logging levels
This can be done in the Confluence UI. See Configuring Logging for instructions on how to change the logging configuration of Confluence.
Specific Confluence logging options
Here's some specific log configurations you may need when troubleshooting.
Log the details of SQL requests made to the database
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. See Enabling Detailed SQL Logging.
Log the details of users accessing each Confluence page
Access logging using Tomcat Valve is enabled by default from Confluence 7.11. These logs are not part of the application log, and can be found at <install directory>/logs/conf_access_log.<date>.log
.
You can however configure the application log to show which users are accessing which pages in Confluence. See How to Enable User Access Logging in our Knowledge Base.
Scanning log files for known problems
Atlassian Troubleshooting and support tools includes a log analyzer that can check for you Confluence logs for errors and match them against known problems in our knowledge base and issue tracker.
See Troubleshooting Problems and Requesting Technical Support to find out how to set up a periodic scan of your log files.
Mark logs when troubleshooting issues
To mark the application log files:
- Go to Administration menu , then General Configuration. > Logging and Profiling.
- If you run Confluence in a cluster, select a cluster node.
- Enter a message, for example "Reproduce directory sync issue".
- Select Rollover log files if you want to start a new log file with your mark (this will delete the oldest log file).
- Select Mark.
Screenshot: The logging and profiling screen in a cluster
Your message will be added to all the application log files (such as atlassian-confluence.log, and atlassian-confluence-security.log). You can mark your logs as often as you need to.
Here's an example:
...
2021-01-04 13:21:47,421 INFO [http-nio-8090-exec-5
[impl.admin.actions.MarkAllLogsAction] execute
***********************************************
Reproduce directory sync issue
************************************************
2021-01-04 13:25:23,901 ERROR [test error] [atlassian.confluence.test] This
is a sample error java.lang.RuntimeException: Unable to find sample error
for testuser
...
Tomcat logs
There are some additional logs in your Confluence install directory that can be useful when troubleshooting issues with your Confluence site.
<install directory>/logs/catalina-<date>.log
This log records Tomcat operations, such as starting and stopping application server.<install directory>/logs/conf_access_log.<date>.log
This is where you find Confluence's access logs. These logs are configured in theserver.xml
. See Tomcat Access Log Valve documentation for further configuration options.<install directory>/logs/gc.<date>.log
This is where you find the garbage collection logs. These logs provide useful information if you're experiencing long GC pauses.