Modifying Jira Garbage Collection logs to exclude the date.

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

By default, the Atlassian-garbage collection logs include the date in their description when the JVM is initialized(For example, when Jira is restarted).

Example:

atlassian-jira-gc-2021-03-12_15-45-25.log.0.current

If you would like to remove the date, you will need to modify the file responsible for the Garbage collection log parameters.

⚠️

 Please note that with GC log rotation(enabled by default), these files will be overwritten causing loss of historical GC data. If you would like to retain historical data, please do not remove the date parameter from the Garbage collection logs. 

Solution

  1. Shutdown Jira

    1. For Jira Data Center, shut down all nodes

  2. Navigate to /<Jira-installation-dir>/bin/set-gc-params.sh

    1. For Windows the file is set-gc-params.bat

  3. Modify the section:

    1. From: -Xloggc:$LOGBASEABS/logs/atlassian-jira-gc-%t.log

    2. To : -Xloggc:$LOGBASEABS/logs/atlassian-jira-gc.log

    3. Remove the -t%

  4. Start Jira

  5. The file format will now beatlassian-jira-gc.log.0.current

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.