Reduce Tomcat logging for Jira server on Windows

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

目的

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-28941 - Getting issue details... STATUS .

ソリューション

このページの内容は、JIRA でサポートされていないプラットフォームに関連しています。したがって、アトラシアンは、そのためのサポートの提供を保証できません 。この資料は情報提供のみを目的としているため、お客様自身の責任でご使用ください。

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-28941 - Getting issue details... STATUS

  1. 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 and Redirect 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


説明 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.
製品Jira
プラットフォームServer
最終更新日 2021 年 6 月 1 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.