Modifying Jira Garbage Collection logs to exclude the date.
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
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.
Solution
- Shutdown Jira
- For Jira Data Center, shut down all nodes
- Navigate to /<Jira-installation-dir>/bin/set-gc-params.sh
- For Windows the file is set-gc-params.bat
- Modify the section:
- From:
-Xloggc:$LOGBASEABS/logs/atlassian-jira-gc-%t.log
- To :
-Xloggc:$LOGBASEABS/logs/atlassian-jira-gc.log
- Remove the -t%
- From:
- Start Jira
- The file format will now be
atlassian-jira-gc.log.0.current