Question


Pegasystems Inc.
JP
Last activity: 30 Jun 2016 5:36 EDT
7.2 How to change PegaRULES.log out put directory ?
I wanted to change default PegaRULES.log out put directory.
Are there any System Settings can achieve this?
Updated: 14 Jun 2016 22:35 EDT


Pegasystems Inc.
JP


Pegasystems Inc.
IN
Hi Chunzhi Hong,
You can create an environment variable and make that environment variable point to the directory path you want.
And mention that environment variable in prlogging.xml as below.
<param name="FileNamePattern" value="'@{environment variable}/PegaRULES-'yyyy-MMM-dd'.log'"/>.
You can create environment variable and make it point to a directory path by following the below steps-->
1.Control Panel-->System and Security-->System-->Advance System Settings
2.Go to Advanced tab
3.Click on Environment variables
and create one.
Thanks and Regards
Sibani Saidarsini
One method is to use the JVM argument -Dpega.logdir=/path/to/your/logs.
The method to set such argument depends on the application server you are using. This link below has an example for IBM WebSphere.
https://pdn.pega.com/support-articles/how-tell-pega-where-look-configuration-files


Pegasystems Inc.
JP
Accepted Solution
Updated: 30 Jun 2016 5:36 EDT
Hi Chunzhi,
I think you have to do this in combination to what was suggested by Sibani. Basically these are the steps you will have to perform.
- Add a java argument to point to an external prlogging.xml file. (e.g. -Dpegarules.logging.configuration=/path/to/logconfig/prlogging.xml)
- Edit the prlogging.xml file to include the log directory java argument.(e.g. <param name="FileNamePattern" value="'@{pega.logdir}/PegaRULES-'yyyy-MMM-dd'.log'"/>)
- Add the log directory java argument. (e.g. -Dpega.logdir=/path/to/your/logs)
You can decide to map prlogging.xml file to a common location or separate per jvm. Your pega.logdir argument will map to separate paths per jvm.
Hope this helps.
The support article below doesn't describe how to specify the root directory for pega logs.
https://pdn.pega.com/support-articles/how-do-i-change-location-prpc-logs
Specifying absolute path in the prlogging.xml doesn't sound good for me.
https://pdn.pega.com/support-articles/configuring-log-rotation-and-location