Question
Anthem
US
Last activity: 12 Apr 2018 11:22 EDT
Syntax @ prlog4j2.xml for the Log files to be generated on hourly basis.
Hi Team,
We are planning to use Time based triggering policy(Log files to be generated on hourly basis) in prlog4j2.xml for the PRPC version 731.
Please help us with the syntax to do the same.
Also find the attachment for the prlog4j2.xml in use.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Anthem
US
Hi Moderators,
Could you please help push this post to the right people.
Pegasystems Inc.
US
Hello-
test this out, involves making a couple of changes to your config:
before
<RollingRandomAccessFile name="ALERT" fileName="${sys:pega.logdir}/PegaRULES-ALERT.log" filePattern="${sys:pega.logdir}/PegaRULES-ALERT-%d{MM-dd-yyyy}-%i.log.gz">
<TimeBasedTriggeringPolicy />
& after
<RollingRandomAccessFile name="ALERT" fileName="${sys:pega.logdir}/PegaRULES-ALERT.log" filePattern="${sys:pega.logdir}/PegaRULES-ALERT-%d{yyyy-MM-dd-hh}-%i.log.gz">
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
changes the filePattern setting from %d{MM-dd-yyyy} to %d{yyyy-MM-dd-hh}
regards,
Phil
Anthem
US
Hi Phil,
Thank you.The changes working out.
Could you also please help with the configuration changes @prlog4j2.xml to zip the log files only after a week.
Anthem
US
Hi Phil,
Could you also please help with the configuration changes @prlog4j2.xml to zip the log files only after a week.
Pegasystems Inc.
US
While there may be a way to do that (that I'm not familiar with), another option is to schedule a script to run weekly, which will zip up the logfiles for you, and copy them off to a fileshare. More info here http://www.techiewiki.org/wiki/Tomcat_log_backup
Anthem
US
Sure Philip.Thank you.
I have changed the logging pattern in prlog4j2.xml from filePattern="D:/PEGA_LOGS/CSX3D/PegaRULES-ALERT-%d{yyyy-MM-dd-hh}-%i.log.gz"> TO filePattern="D:/PEGA_LOGS/CSX3D/PegaRULES-ALERT.log"> so as to avoid zipping of the PegaRules log file.
Although the log files has been generated,we couldnt find any data in it.
Please help.
Pegasystems Inc.
US
if you only drop the .gz instead, I think that should prevent the zipping
daily without zipping
filePattern="D:/PEGA_LOGS/COMPASS1D/PegaRULES-%d{MM-dd-yyyy}-%i.log"
hourly without zipping
filePattern="D:/PEGA_LOGS/COMPASS1D/PegaRULES-%d{yyyy-MM-dd-hh}-%i.log"
-
Alejandro Klever Clemente