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

Unable to Roll over the Log Using "RollingFileAppender"



What is the prlogging.xml configuration to roll the log file based on size?
Upon changing the appender class to RollingFileAppender, the following error message was seen in the log
log4j:WARN No such property [fileNamePattern] in com.pega.apache.log4j.RollingFileAppender.

There has also been a requirement to roll the log file based on both size and date, for example:


This issue is resolved through the following local change:

RollingFileAppender has a different set of attributes required. These includes maxFileSize and MaxBackupIndex. And the file name should not have date time pattern. Here's how it should look like.

<appender name="PEGA" class="com.pega.apache.log4j.RollingFileAppender">
    <param name="File" value="@{web.tmpdir}/PegaRULES.log"/>
    <param name="maxFileSize" value="1MB"/>
    <param name="MaxBackupIndex" value="10"/>
    <layout class="com.pega.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d [%20.20t] [%10.10X{pegathread}] [%20.20X{tenantid}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n"/>

To roll the log file based on both size and date, you will need to write up a custom log appender. This is not a supported feature in Pega.

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