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 log certain log messages to a separate file

SA-25488

Summary



The log files are configured to roll over daily but due to custom application logging, logs can grow up to 4 GB in size.

User wants to know how to configure logging to send this application data to a separate file so that the PegaRULES log file stays in a manageable state for issue analysis.


Error Messages

Not Applicable. 


Steps to Reproduce

Not Applicable. 


Root Cause



Not Applicable

Resolution



Update prlogging.xml and notice how you can create your own appender, file name and category elements such as specific activities to use this appender.
 
                <appender name="App12" class="com.pega.pegarules.priv.util.DailySizeRollingFileAppenderPega">
                  <param name="FileNamePattern" value="'@{web.tmpdir}/PegaApp12-'yyyy-MMM-dd'.log'"/>
                  <param name="MaxFileSize" value="500MB" />
                  <layout class="com.pega.apache.log4j.PatternLayout">
                                <param name="ConversionPattern" value="%d [%20.20t] [%20.20X{tenantid}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n"/>
                  </layout>
                </appender>
 
                <category name="Rule_Obj_Activity.SendSimpleEmail.PegaSample.Action" additivity="false">
                                <priority value="debug"/>
                                <appender-ref ref="App12"/>
                </category>
               
                <category name="Rule_Obj_Activity.pyDeleteActivityTest.PegaSample.Action" additivity="false">
                                <priority value="debug"/>
                                <appender-ref ref="BIX"/>
                </category>
               

Published July 22, 2016 - Updated October 8, 2020

Was this useful?

100% 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?

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