BigPicture logs - divert to a separate file

Instructions for Jira Data Center and Server 9.5 or newer

The following instructions apply to Jira Data Center and Server 9.5 or newer.

Below you’ll find instructions on setting up a separate log file for BigPicture debug data.

If you are encountering a significant amount of BigPicture debug data being sent to the atlassian-jira.log file and would prefer to direct it to a dedicated log file, you can achieve this by modifying the configuration of Jira's log4j2 file manually.

Steps

  1. Open the log4j2.xml* file in the text editor of your choice.

  2. Add the following snippet before the </Appenders> tag:

    <JiraHomeAppender name="bigpicture" fileName="bigpicture.log" filePattern="bigpicture.log.%i"> <PatternLayout> <Pattern>%d{yyyy-MM-dd HH:mm:ss,SSSZ} %p [%X{jira.mailserver}] [%t] %X{jira.username} %X{jira.request.id} %X{jira.request.assession.id} %X{jira.request.ipaddr} %X{jira.request.url} [%c{1}] %m%n</Pattern> </PatternLayout> <Policies> <SizeBasedTriggeringPolicy size="20480 KB"/> </Policies> <DefaultRolloverStrategy fileIndex="min" max="5"/> </JiraHomeAppender>
  3. Add the following snippet before the </Loggers> tag:

    <Logger name="com.softwareplant" level="INFO" additivity="false"> <AppenderRef ref="bigpicture"/> </Logger>

This will create a separate bigpicture.log file for all logs from our App or from the com.softwareplant package specifically.

If necessary, you may adjust the pattern according to your needs, such as by adding additional data or presenting it differently.

Where to find the log4j2.xml file?

Refer to the Atlassian’s guide on where to find the file:

If you want 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.

Instructions for Jira Data Center and Server 9.4 or earlier

The following instructions apply to Jira Data Center and Server 9.4 or earlier.

Below you’ll find instructions on setting up a separate log file for BigPicture debug data.

If you get a sizable amount of BigPicture debugs data sent to atlassian-jira.log but would instead divert it to a dedicated log file, you can do it by manually changing the configuration of Jira’s log4jfile. 

Steps

  1. Add the following snippet to your log4j.properties* file:

    log4j.appender.bigpicture=com.atlassian.jira.logging.JiraHomeAppender log4j.appender.bigpicture.File=bigpicture.log log4j.appender.bigpicture.MaxFileSize=20480KB log4j.appender.bigpicture.MaxBackupIndex=5 log4j.appender.bigpicture.layout=com.atlassian.logging.log4j.NewLineIndentingFilteringPatternLayout log4j.appender.bigpicture.layout.ConversionPattern=%d %p [%X{jira.mailserver}] %t %X{jira.username} %X{jira.request.id} %X{jira.request.assession.id} %X{jira.request.ipaddr} %X{jira.request.url} %m%n log4j.logger.com.softwareplant = INFO, console, bigpicture log4j.additivity.com.softwareplant = false AN ADDITIONAL BIG
  2. Restart your Jira instance.

This will create a separate bigpicture.log file for all logs from our app or from the com.softwareplant package specifically).

Where to find the log4.properties file?

The log4.properties file is located in WEB-INF/classes/log4j.properties.

To find this path:

  1. Go to Jira Administration > System > Logging & Profiling.

  2. Scroll down to the Default Loggers section.

  3. You can further configure the granularity of the log file by clicking on the Configure logging level for another file option and choosing the desired logging levels.