Support Article
Log file does not roll over
SA-75687
Summary
The log file does not roll over.
Error Messages
Not Applicable
Steps to Reproduce
Unknown
Root Cause
A defect or configuration issue in the operating environment.
The default behavior for the out-of-the-box prlog4j2.xml settings for the file appender is as below,
<RollingRandomAccessFile name="PEGA" fileName="${sys:pega.logdir}/PegaRULES.log" filePattern="${sys:pega.logdir}/PegaRULES-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout>
<Pattern>%d [%20.20t] [%10.10X{pegathread}] [%20.20X{tenantid}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n</Pattern>
</PatternLayout>
<Filters>
<!--Deny message logged under ALERT log level-->
<ThresholdFilter level="ALERT" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
<DefaultRolloverStrategy max="20"/>
</RollingRandomAccessFile>
Resolution
Here’s the explanation for the reported behavior:
In the above configuration, there is no time based policy and the roll over point is 250 MB.
Modify the configuration as per requirement (refer to the documentation on the Apache log4js website).
Published March 22, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.