Question
Elevance Health inc.
US
Last activity: 16 Feb 2022 8:48 EST
purging PegaRules log files
Hi, I am trying to update the prlog4j2.xml to purge the log files after a specified time period. Below are the sample settings in the XML file. I have tried many combinations in the defaultRollingOverStrategy tag settings, but have not succeeded. Any help would be greatly appreciated.
Hi, I am trying to update the prlog4j2.xml to purge the log files after a specified time period. Below are the sample settings in the XML file. I have tried many combinations in the defaultRollingOverStrategy tag settings, but have not succeeded. Any help would be greatly appreciated.
<RollingRandomAccessFile name="PEGA" fileName="${sys:pega.logdir}/PegaRULES.log" filePattern="${sys:pega.logdir}/PegaRULES-%d{yyyyMMddhhmmss}.log">
<PatternLayout>
<Pattern>%d [%20.20t] [%10.10X{pegathread}] [%20.20X{tenantid}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{RequestorId} %X{userid} - %m%n</Pattern>
</PatternLayout>
<Filters>
<!--Deny message logged under ALERT log level-->
<ThresholdFilter level="ALERT" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy interval="10" modulate="true"/>
</Policies>
<DefaultRolloverStrategy>
<Delete basePath="${sys:pega.logdir}" maxDepth="1">
<IfFileName glob="PegaRULES-*.log" />
<IfLastModified age="30s" />
</Delete>
</DefaultRolloverStrategy>
</RollingRandomAccessFile>
Regards,
Jay
