Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

How to Configure Automatic Purging of Logs

SA-8303

Summary



Instruction to purge log files automatically after certain amount of time in PRPC 5.5 SP1.


Resolution



There is no functionality  included for this in PRPC 5.5 SP1. This is first introduced with PRPC 7.1.7.
Following are the two suggestions that can be helpful:
 
1. Use RollingFileAppender and specify values for MaxFileSize and MaxBackupIndex parameters, which purges older logs.
     However, as the logs are rolled based on size, this might result in inconsistent duration of time.

2. Use DailyRollingFileAppender to roll the logs based on time (such as daily or weekly) and utilize tools outside of PRPC to purge older files.
 
 Following is an example of how prlogging.xml must be configured for option 1:
    
<appender name="PEGA" class="com.pega.apache.log4j.RollingFileAppender">
                 <param name="File" value="PegaRULES.log"/>
                 <param name="MaxFileSize" value="100MB"/>
                 <param name="MaxBackupIndex" value="3"/>
         <layout class="com.pega.apache.log4j.PatternLayout">
                 <param name="ConversionPattern" value="%d{ABSOLUTE} [%20.20t] (%30.30c{3}) %-5p - %m%n"/>
         </layout>
     </appender>

 
The above example generate log files: PegaRULES.log, PegaRULES.log.1, PegaRULES.log.2, and PegaRULES.log.3 (three backups and one active log file). The log file with no number contains the latest log entries. In the example above, the oldest entries is present in 'PegaRULES.log.3' log file.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us