Skip to main content

Support Article

Configuring log rotation and location

SA-10352

Summary



How do you configure log rotation and location?

Resolution



This issue is resolved through the following Local-change:
 
To change the default path of the generated logs to any directory outside of the server’s temp directory, make the following change in the appender definitions (as in example below) inside prlogging.xml.
 
From:

<appender name="PEGA" class="com.pega.pegarules.priv.util.DailySizeRollingFileAppenderPega">
       <param name="FileNamePattern" value="'@{web.tmpdir}/PegaRULES-'yyyy-MMM-dd'.log'"/>
       <param name="MaxFileSize" value="50MB" />
       <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"/>
       </layout>
     </appender>

 
To:
               
<appender name="PEGA" class="com.pega.pegarules.priv.util.DailySizeRollingFileAppenderPega">
       <param name="FileNamePattern" value="'/usr/pega/logs/PegaRULES-'yyyy-MMM-dd'.log'"/>
       <param name="MaxFileSize" value="50MB" />
       <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"/>
       </layout>
     </appender>

 
The above example assumes that you have already created a directory named ‘/usr/pega/logs’ in the server file system and the server process’s user id/group has read, write and execute file permissions to that directory.
Suggest Edit

Published June 12, 2015 - Updated October 8, 2020

Did you find this content helpful?

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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