Issue: Rolling the Pega Log -- incorrect entry in the 5.1 documentation
Symptom
Process Commander uses the Apache Jakarta log4j package for logging and messaging. These two log files capture system information that helps you assess performance and bottlenecks:
- Alert log – collects information about specific performance and operational issues.
- Pega log - collects system errors, exceptions with their stack trace information, and debug statements.
You can configure log4j to start a new log file or "roll" the log file at a specified time. This keeps each log file at a reasonable size and allows you to easily review the contents.
To roll the log file, make the following changes to the prlogging.xml
file (changes are in red font):
NOTE: For complete instructions see Rolling the Pega Log and Rolling the Alert Log sections in the Administration and Security Guide V5.1 , but note the corrections below.
Prlogging.xml changes for Pega Log:
<appender name=”PEGA”
class=”com.pega.apache.log4j.DailyRollingFileAppender”>
<param name=”DatePattern” value=”’.’”yyyy-mm-dd”/>
<param name=”File” value=”’…/PegaRULES.log’”/>
<layout class=”com.pega.apache.log4j.PatternLayout”>
<param name=”ConversionPattern” value=”%d{ABSOLUTE} [%20.20t]
(%30.30c{3}) %-5p %{stack} %x{userid} - %m%n/>
</layout?
<appender>
Prlogging.xml changes for the Alert Log
<appender name=”ALERT”
class=”com.pega.apache.log4j.DailyRollingFileAppender”>
<param name=”DatePattern” value=”’.”yyyy-mm-dd”/>
<param name=”File” value=”’…/PegaRULES-ALERT.log’”/>
<layout class=”com.pega.apache.log4j.PatternLayout”>
<param name=”ConversionPattern” value=”%d{ABSOLUTE} [%20.20t]
(%30.30c{3}) %-5p %{stack} %x{userid} - %m%n/>
</layout?
<appender>
After you make these changes, you may receive an error similar to the following when you run the log files:
java.io.FileNotFoundException: '..\PegaRULES.log' (The system cannot find the path specified)
<stack trace>
log4j:ERROR Either File or DatePattern options are not set for appender [PEGA].
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: '..\PegaRULES-ALERT.log' (The system cannot find the path specified)
<stack trace>
log4j:ERROR Either File or DatePattern options are not set for appender [PEGA].
log4j:ERROR setFile(null,true) call failed.
This error occurs due to an incorrect entry in the Administration and Security Guide V5.1 . Note this error also appears in the above examples. The issue resides in the following entries:
Incorrect entry in Pega Log instructions
<param name=”File” value=”’…/PegaRULES.log’”/>
Incorrect entry in Pega Alert instructions
<param name=”File” value=”’…/PegaRULES-ALERT.log’”/>
Solution
Edit the prlogging.xml
file. Remove the single quote from these lines so they appear as follows:
Corrected Pega Log entry
<param name=”File” value=”…/PegaRULES.log”/>
Corrected Pega Alert entry
<param name=”File” value=”…/PegaRULES-ALERT.log”/>