Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Log Rotation Daily

drew_mace
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 13, 2018

How can i use a similar tactic on our confluence logs:

 

<Appenders>

<RollingFile name="file" fileName="${sys:aomewhere.home}${sys:file.separator}logs${sys:file.separator}api.log"

filePattern="${sys:somewhere.home}${sys:file.separator}logs${sys:file.separator}archive${sys:file.separator}api-%d{yyyy-MM-dd}.log.gz">

<PatternLayout pattern="%d [%t] %-5p %c - %m%n" />

<TimeBasedTriggeringPolicy />

<DefaultRolloverStrategy max="10"/>

</RollingFile>

</Appenders>

1 answer

1 vote
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 14, 2018

Hi Drew,

This can be done by editing the log4j.properties file

/opt/atlassian/confluence/confluence/WEB-INF/classes/log4j.properties

an example:

log4j.appender.confluencelog=com.atlassian.confluence.logging.ConfluenceHomeLogAppender
log4j.appender.confluencelog.File=/opt/var-atlassian/application-data/confluence/logs/atlassian-confluence.log
log4j.appender.confluencelog.Threshold=DEBUG
log4j.appender.confluencelog.MaxFileSize=20480KB
log4j.appender.confluencelog.MaxBackupIndex=5
log4j.appender.confluencelog.layout=com.atlassian.confluence.util.PatternLayoutWithContext
log4j.appender.confluencelog.layout.ConversionPattern=%d %p [%t] [%c{4}] %M %m%n

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events