Change logging levels in Jira Server

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 は除く

目的

The purpose of this article is to show how you can set the logging level for a package in Jira.

ソリューション

Use the following instructions to set the logging level temporarily or permanently.

Setting the logging level temporarily

There are options within Jira to temporarily configure the logging level for a package using the Logging and Profiling page:

  • To increase/decrease the logging level for a package already listed, choose the level on the right hand side in the 'Set Logging Level' column.
  • To set the logging level for another package, that isn't listed, choose the option to Configure logging level for another package. That will prompt you to specify the package and logging level.

Setting the logging level permanently

The information in this page relates to customizations in Jira. Consequently, Atlassian Support cannot guarantee to provide any support for the steps described on this page as customizations are not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.

また、ファイルの直接変更によって行われるカスタマイズは、アップグレード プロセスには含まれない点にご注意ください。このような変更は、アップグレード後のインスタンスで手動で再適用する必要があります。

Jira Data Center and Server 9.4 or earlier

If you are looking to set the logging level for a package permanently, you can do so by configuring the log4j.properties file, located in the $JIRA_INSTALL/atlassian-jira/WEB-INF/classes/ directory.

Example of setting the logging level for a package in log4j.properties.

Looking at the logging level for the package com.atlassian.jira.issue.index we can see it is set to INFO level logging:

log4j.logger.com.atlassian.jira.issue.index = INFO, console, filelog

To persistently set this to DEBUG level logging, you'll want to update the logger config for that package. In this example, we have commented out the INFO level logger and added a DEBUG level logger for the com.atlassian.jira.issue.index package:

#log4j.logger.com.atlassian.jira.issue.index = INFO, console, filelog
log4j.logger.com.atlassian.jira.issue.index = DEBUG, console, filelog

Restarting Jira is necessary for it to pick up any changes to log4j.properties.

Jira Data Center and Server 9.5 or newer

If you are looking to set the logging level for a package permanently, you can do so by configuring the log4j2.xml file, located in the $JIRA_INSTALL/atlassian-jira/WEB-INF/classes/ directory.

Example of setting the logging level for a package in log4j2.xml.

Looking at the logging level for the package com.atlassian.jira.issue.index, we can see it is set to INFO level logging:

<Logger name="com.atlassian.jira.issue.index" level="INFO" additivity="false">
    <AppenderRef ref="filelog"/>
</Logger>

To persistently set this to DEBUG level logging, you'll want to update the logger config for that package. In this example, we have commented out the INFO level logger and added a DEBUG level logger for the com.atlassian.jira.issue.index package:

<!--<Logger name="com.atlassian.jira.issue.index" level="INFO" additivity="false">-->
<Logger name="com.atlassian.jira.issue.index" level="DEBUG" additivity="false">
    <AppenderRef ref="filelog"/>
</Logger>

Restarting Jira is necessary for it to pick up any changes to log4j2.xml.

最終更新日: 2022 年 12 月 7 日

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

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