-
Type:
Bug
-
Resolution: Tracked Elsewhere
-
Priority:
Low
-
None
-
Affects Version/s: 8.5.4, 8.5.5
-
Component/s: Troubleshooting and Support Tools (ATST)
-
None
-
8.05
-
2
-
Severity 2 - Major
-
5
If system administrator modified the location of {{atlassian-jira
.log}} file following the steps defined on our documentation Logging and profiling it doesn't show in Support zip file:
Steps to reproduce:
- Stop Jira
- Delete JIRA_HOME/logs/atlassian-jira.log*
- Edit atlassian-jira/WEB-INF/classes/log4j.properties to specify another directory as
log4j.appender.filelog=org.apache.log4j.RollingFileAppender log4j.appender.filelog.File=/tmp/test/atlassian-jira.log
- Restart Jira and check if /tmp/test/atlassian-jira.log is there.
- Go to Jira Admin >Support Tools, create Support Zip file
Actual Result:
Support zip file doesn't contain the atlassian-jira.log files.
Expected Result:
Support zip should have atlassian-jira.log file.
Workaround 1:
Two appenders can be used in logging, therefore original appender will be kept intact.
In the below example a new appended secondlog is added to log4j configuration which is logging to path /opt/jira/logs/atlassian-jira.log
log4j.appender.secondlog=org.apache.log4j.RollingFileAppender
log4j.appender.secondlog.File=/opt/jira/logs/atlassian-jira.log
log4j.appender.secondlog.MaxFileSize=20480KB
log4j.appender.secondlog.MaxBackupIndex=10
log4j.appender.secondlog.layout=com.atlassian.logging.log4j.NewLineIndentingFilteringPatternLayout
log4j.appender.secondlog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSSZ} %t %p %X{jira.username} %X{jira.request.id} %X{jira.request.assession.id} %X{jira.request.ipaddr} %X{jira.request.url} [%q{2}] %m%n
# re-enable when JDEV-33891 is resolved or improved
log4j.appender.secondlog.layout.StackTracePackagingExamined=false
log4j.appender.secondlog.layout.MinimumLines=6
log4j.appender.secondlog.layout.ShowEludedSummary=false
log4j.appender.secondlog.layout.FilteringApplied=true
log4j.appender.secondlog.layout.FilteredFrames=@jira-filtered-frames.properties
You should also add the new appenders to the rootLogger and other package configurations.
# To turn more verbose logging on - change "WARN" to "DEBUG" log4j.rootLogger=WARN, filelog, secondlog .... .... log4j.logger.com.atlassian = WARN, filelog, secondlog log4j.additivity.com.atlassian = false log4j.logger.com.atlassian.jira = INFO, filelog, secondlog log4j.additivity.com.atlassian.jira = false
Workaround 2:
If there is no need to keep 2 copies of the log file, the appender can be changed back to default.
I.e. change this:
log4j.appender.secondlog=org.apache.log4j.RollingFileAppender
log4j.appender.secondlog.File=/opt/jira/logs/atlassian-jira.log
to this
log4j.appender.filelog=com.atlassian.jira.logging.JiraHomeAppender
log4j.appender.filelog.File=atlassian-jira.log
The above will configure JIRA to put the atlassian-jira.log file in the $JIRA_HOME/log folder