Documentation for JIRA 4.2. Documentation for other versions of JIRA is available too.

Skip to end of metadata
Go to start of metadata

On this page:

Logging

JIRA uses a powerful logging module called log4j for runtime logging.

Log file location

The logs are written to your JIRA Home Directory (or the current working directory, if the JIRA home directory is not configured). You can view the location of the atlassian-jira.log (and the current working directory) in the 'File Paths' section of the System Information page.

  • Security-related information (e.g. login, logout, session creation/destruction, security denials) is written to atlassian-jira-security.log.

Changing the location of the log

In the log4j.properties file (located in the JIRA Home Directory),

  1. Change the following line:
    ...to this:
  2. Change the following line to point to the new location of the log file:

Logging levels

There are five logging levels available in log4j: 'DEBUG', 'INFO', 'WARN', 'ERROR' and 'FATAL'. Each logging level provides more logging information that the level before it:

  • 'DEBUG'
  • 'INFO'
  • 'WARN'
  • 'ERROR'
  • 'FATAL'

'DEBUG' provides the most verbose logging and 'FATAL' provides the least verbose logging. The default level is WARN, meaning warnings and errors are displayed. Sometimes it is useful to adjust this level to see more detail.

The default logging levels can be changed either

  • temporarily — your change to the logging level will not persist after you next restart JIRA, or
  • permanently — your change to the logging level will persist, even after you restart JIRA.

For example, when troubleshooting, you might temporarily change the logging level from 'WARNING' to 'INFO' so as to get a more detailed error message or a stack trace. If you are unsure of which logging categories to adjust, the most helpful information generally comes from the log4j.rootLogger category and the log4j<category>.com.atlassian categories.

Temporarily changing the logging level

  1. Log in as a user with the 'JIRA System Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. Under the 'System' sub-menu in the left-hand navigation column, click the 'Logging & Profiling' link.
  4. The 'Logging & Profiling' page will display. This lists all the defined log4j categories and their current logging levels. To edit the logging level of a category, click the 'Edit' link next to the category in the list.
  5. Choose the new logging level for the category, then click 'Update'.

Permanently changing the logging level

  1. Edit the log4j.properties file, which is found in the WEB-INF/classes/ directory under the JIRA web application directory.
  2. Locate the section:
    log4j.logger.com.atlassian = WARN, console, filelog
    log4j.additivity.com.atlassian = false
    
    and make your desired changes (e.g. change the WARN to DEBUG).
    Icon

    The log4j.properties file that ships with JIRA has the default logging levels specified. For more information about log4j (e.g. how to define new logging categories), and about the format of the log4j.properties file, please refer to the documentation on the log4j site.

  3. (Only if you are running JIRA EAR-WAR) Reduild and redeploy the webapp.
  4. Restart JIRA.
Icon

If your application server itself configures logging (e.g. JBoss), you may need to remove the log4j.properties file. On some servers (e.g. JBoss 3.0), you may also need to remove the entire log4j.jar file to get logging to work.

Profiling

(minus) If you are using JIRA version 4.2.0 or 4.2.1, we strongly recommend that you do not enable profiling as this will cause JIRA to generate an error when the 'Watched Issues' gadget is used on the Dashboard. (See JRA-22623 for details.) To resolve this issue, upgrade to JIRA 4.2.2 or later.

If you are experiencing performance issues with JIRA, it is often helpful to see where the slow-downs occur. To do this you can enable profiling as described below, and then analyse the performance traces that JIRA will produce for every request. An example of a profiling trace is shown below:

Profiling can be enabled either

  • temporarily — profiling will be enabled until you next restart JIRA, or
  • permanently — profiling will remain enabled, even after you restart JIRA.

Temporarily enabling profiling

  1. Log in as a user with the 'JIRA System Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. Under the 'System' sub-menu in the left-hand navigation column, click the 'Logging & Profiling' link.
  4. The 'Logging & Profiling' page will display. Scroll to the bottom of the screen. The 'Profiling' section will inform you whether profiling is currently turned 'ON' or 'OFF', and will also show or hide the 'Disable profiling' and 'Enable profiling' links respectively.
    • To turn Profiling 'ON', click the 'Enable profiling' link. JIRA will start generating profiling traces in its log.
    • To turn Profiling 'OFF', click the 'Disable profiling' link.

Permanently enabling profiling

  1. Edit atlassian-jira/WEB-INF/web.xml (if you are using JIRA Standalone) or webapp/WEB-INF/web.xml in your JIRA installation directory (if you are using JIRA EAR/WAR).
  2. Find the following entry:
  3. Modify the autostart parameter to be true instead of false. That is:
  4. Save the file. If you are running JIRA Standalone this is all you have to do. Profiling will be enabled when you restart JIRA.
  5. If you are running JIRA EAR/WAR, re-build and re-deploy the JIRA web application using the build script and the instructions for your application server.