Temporarily changing the logging level doesn't work and no error is shown

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Summary

The purpose of this article is to describe a scenario where changing the logging level for debug packages in Jira via the page ⚙ > System > Logging & Profiling doesn't work, meaning that the package does not get added to the logger list in the UI.

Environment

Jira Server/Data Center on any version from 9.5.0

Diagnosis

  • Following the instructions from Change logging levels in Jira Server - Setting the logging level temporarily to add a debug package does not work: the package is not added to the list of packages. You can click "Configure", add the package name, set the intended logging level, and hit "Add". You will notice the package is not added.

  • Jira is on any version from 9.5.0

  • Go to the page ⚙ > System > System Info, scroll to the section JVM Input Arguments and check if the 4 JVM parameters below are listed in that section. If they are missing, then this KB article is relevant and you can move on to the Resolution section

    1 -Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.disableJmx=true -Dlog4j2.garbagefree.threadContextMap=true -Dlog4j2.isWebapp=false

Cause

Log4J has been updated to version 2.x on Jira 9.5.x and new JVM arguments have been included by default in the setenv.sh and setenv.bat files coming from fresh Jira installations:

1 -Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.disableJmx=true -Dlog4j2.garbagefree.threadContextMap=true -Dlog4j2.isWebapp=false

Jira admins performing system updates or upgrades might rollover changes included by default in these files if they replace the file without manually adding their customizations.

If these new arguments are missing, the symptoms described here will be observed.

Solution

Resolution

To solve the problem you need to add back the 4 JVM parameters listed in the Cause section on the line starting with "JVM_REQUIRED_ARGS", the full line can be seen below:

1 JVM_REQUIRED_ARGS='-Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.disableJmx=true -Dlog4j2.garbagefree.threadContextMap=true -Dlog4j2.isWebapp=false -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory'

ℹ️ It's necessary to make this change to each Jira node in case of a cluster and to restart all the nodes to make the change effective.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.