Support Article
Pega log files occupy a large amount of disk space
Summary
Pega log files occupy a large amount of disk space.
The requirement is to configure the log files such that they purge after some time.
Error Messages
Not Applicable
Steps to Reproduce
Not Applicable
Root Cause
Not Applicable
Resolution
Perform the following local-change:
- Configure the log files to roll to a new log based on the size. The old data will have an index number appended to it.
- Specify the maximum number of these indexes to limit the total amount of logs stored.
- Specify the appender class in prlogging.xml in addition to the parameters included, for example:
<appender name="PEGA" class="com.pega.pegarules.priv.util.RollingFileAppenderPega">
<param name="MaxBackupIndex" value="9"/>
<param name="MaxFileSize" value="100MB" />
<param name="FileNamePattern" value="'@{web.tmpdir}/PegaRULES-'yyyy-MMM-dd'.log'"/>
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%20.20t] [%10.10X{pegathread}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n"/>
</layout>
</appender>
Published December 25, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.