Discussion

Changing the path for log files

Hi,

Is it possible to change the default path for ALERTS /PEGARULES logs to custom path ? If yes , How?

THanks,

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

August 4, 2009 - 9:37am

Yes.
It should be changed on prlogging.xml (log4.xml). It will be located on prweb/WEB-INF/classes if it is WAR deployment
More infor available on
http://pdn.pega.com/devnet/PRPCv4/KB/10403.asp

April 21, 2014 - 1:48am

Hi Lingasamy,

If I press on link http://pdn.pega.com/devnet/PRPCv4/KB/10403.asp, it says "the content is unpublished". Any way out?

Thanks,

Baidurjya

May 13, 2014 - 6:09am

any update?

Thanks,
Baidurjya

June 17, 2014 - 2:50am

still I am getting  "the content is unpublished" if I press on link http://pdn.pega.com/devnet/PRPCv4/KB/10403.asp

 

Thanks,

Baidurjya

April 1, 2015 - 5:51am

Any update till then?

Pega
April 1, 2015 - 1:18pm

Hi BaidurjyaC,

Yes, it is possible to change the default location of all the Pega Log files. This requires you modify the prlogging.xml file embedded in the prpc_j2ee14.ear file on the Application Server and then restart the Application Server. The prlogging.xml file can be found in the prpc_j2ee14.ear>APP-INF>lib.

In Pega 7.1 the default entry in prlogging.xml for the Alert Log is:

<appender name="ALERT" class="com.pega.pegarules.priv.util.FileAppenderPega">

            <param name="FileNamePattern" value="'@{web.tmpdir}/PegaRULES-ALERT-'yyyy-MMM-dd'.log'"/>

            <layout class="com.pega.apache.log4j.PatternLayout">

                        <param name="ConversionPattern" value="%m%n" />

            </layout>

</appender>

Here is an example of a valid modification to place the Alerts log file into a "logs" folder instead (in this particular example I am running PRPC on JBoss on a Windows 7 64 bit OS:

<appender name="ALERT" class="com.pega.pegarules.priv.util.FileAppenderPega">

            <param name="FileNamePattern" value="'C:/jboss-5.0.1.GA/server/pega/log/PegaRULES-ALERT-'yyyy-MMM-dd'.log'"/>

            <layout class="com.pega.apache.log4j.PatternLayout">

                                    <param name="ConversionPattern" value="%m%n" />

            </layout>

</appender>

You can read more about How to customize logs with the prlogging.xml file with this PDN Article:  https://pdn.pega.com/system-operations/how-to-customize-logs-with-the-prloggingxml-file

Hope this helps.

Regards,

Henry

Pega Academy

 

April 3, 2015 - 5:15am

Thanks Henry very much kindly. It is working.