Reduce Tomcat logging for Jira server on Windows
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
By default, JIRA applications mirror the application log output (atlassian-jira.log) to the Tomcat service stdout log file: service-stdout.YEAR-MONTH-DAY.log (eg: jira220415104039-stdout.2016-03-31). This file can grow quite large and cannot be rotated by JIRA applications using Log4j configuration.
There is a suggestion to handle this better in product tracked in - JRA-28941Getting issue details... STATUS .
Solution
The content on this page relates to platforms which are not supported by JIRA. Consequently, Atlassian cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.
Unfortunately, there is no Logrotate solution for opened files for Windows and Tomcat Procrun is not able to logrotate it either (See https://commons.apache.org/proper/commons-daemon/procrun.html). So you have following options.
Option1
Reduce logging to stdout, see workaround in the - JRA-28941Getting issue details... STATUS
- Edit <JIRA_INSTALL>/atlassian-jira/WEB-INF/classes/log4j.properties file and do either:
Increase logging level for console loggers to WARN
diff -u ./atlassian-jira-6.4.13-standalone//atlassian-jira/WEB-INF/classes/log4j.properties ./log4j.properties --- ./atlassian-jira-6.4.13-standalone//atlassian-jira/WEB-INF/classes/log4j.properties 2016-02-25 06:10:30.000000000 +0100 +++ ./log4j.properties 2016-09-26 15:51:16.000000000 +0200 @@ -28,12 +28,12 @@ log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.Threshold=DEBUG +log4j.appender.console.Threshold=WARN log4j.appender.console.layout=org.apache.log4j.PatternLayout log4j.appender.nowarnconsole=org.apache.log4j.ConsoleAppender -log4j.appender.nowarnconsole.Threshold=DEBUG +log4j.appender.nowarnconsole.Threshold=WARN log4j.appender.nowarnconsole.layout=org.apache.log4j.PatternLayout
(Recommended) Or remove all console from log specific logging events, see example:
-log4j.logger.com.atlassian = WARN, console, filelog +log4j.logger.com.atlassian = WARN, filelog log4j.additivity.com.atlassian = falseRestart JIRA
2. Restart JIRA. You may delete old files.
Option2
Fully disable Stdout logging for Procrun Tomcat service. Using this option has a side-effect: crash messages from JVM will be lost.
Under
Redirect Stdout
andRedirect Stderror
, remove the value "auto" so the fields are left empty.
See more details in related KB: How to disable bamboo-stdout and bamboo-stderr logging on Windows