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 

Error rendering macro 'excerpt-include'

User 'null' does not have permission to view the page.

 and follow the prompts to create a Support Zip.

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. 

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 the RollingFileAppender line and change the destination file in the line below it. Comment out the previous lines referring to the ConfluenceHomeLogAppender.

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

Error rendering macro 'includeplus'

User 'anonymous' does not have permission to view the page with ID 1035241277.

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 the server.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. 
Last modified on Jan 31, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.