Change logging levels in Jira Server / Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

The purpose of this article is to show how you can set the logging level for a package in Jira.

Solution

Use the following instructions to set the logging level temporarily or permanently.

Setting the logging level temporarily

There are options within Jira to temporarily configure the logging level for a package using the Logging and Profiling page:

  • To increase/decrease the logging level for a package already listed, choose the level on the right hand side in the 'Set Logging Level' column.
  • To set the logging level for another package, that isn't listed, choose the option to Configure logging level for another package. That will prompt you to specify the package and logging level.

Setting the logging level permanently

The information in this page relates to customizations in Jira. Consequently, Atlassian Support cannot guarantee to provide any support for the steps described on this page as customizations are not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.

Also, please be aware that customizations done by directly modifying files are not included in the upgrade process. These modifications will need to be reapplied manually on the upgraded instance.

Jira Data Center and Server 9.4 or earlier

If you are looking to set the logging level for a package permanently, you can do so by configuring the log4j.properties file, located in the $JIRA_INSTALL/atlassian-jira/WEB-INF/classes/ directory.

Example of setting the logging level for a package in log4j.properties.

Looking at the logging level for the package com.atlassian.jira.issue.index we can see it is set to INFO level logging:

log4j.logger.com.atlassian.jira.issue.index = INFO, console, filelog

To persistently set this to DEBUG level logging, you'll want to update the logger config for that package. In this example, we have commented out the INFO level logger and added a DEBUG level logger for the com.atlassian.jira.issue.index package:

#log4j.logger.com.atlassian.jira.issue.index = INFO, console, filelog
log4j.logger.com.atlassian.jira.issue.index = DEBUG, console, filelog

Restarting Jira is necessary for it to pick up any changes to log4j.properties.

Jira Data Center and Server 9.5 or newer

If you are looking to set the logging level for a package permanently, you can do so by configuring the log4j2.xml file, located in the $JIRA_INSTALL/atlassian-jira/WEB-INF/classes/ directory.

Example of setting the logging level for a package in log4j2.xml.

Looking at the logging level for the package com.atlassian.jira.issue.index, we can see it is set to INFO level logging:

<Logger name="com.atlassian.jira.issue.index" level="INFO" additivity="false">
    <AppenderRef ref="filelog"/>
</Logger>

To persistently set this to DEBUG level logging, you'll want to update the logger config for that package. In this example, we have commented out the INFO level logger and added a DEBUG level logger for the com.atlassian.jira.issue.index package:

<!--<Logger name="com.atlassian.jira.issue.index" level="INFO" additivity="false">-->
<Logger name="com.atlassian.jira.issue.index" level="DEBUG" additivity="false">
    <AppenderRef ref="filelog"/>
</Logger>

Restarting Jira is necessary for it to pick up any changes to log4j2.xml.

Last modified on Oct 16, 2024

Was this helpful?

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