Pega provides tools to debug application and evaluate application performace through performance statistics, events and system logs. Lets learn about How To Debugging And Performance In Pega 8.
Log Files:
Pega writes errors, warnings, and other debug information to Log files. Pega manages logs based on the appender configuration in the prlog4j2.xml for the node.
In Dev Studio, logs are available from the Configure > System > Operations landing page.
Note: In an activity, use the Log-Message method to add a message to the PEGA log.
- The PEGA log contains warnings, errors, and information messages about internal operations.
- The ALERT log contains performance related alerts.
- The ALERTSECURITY log contains alerts (identfied by the prefix SECU) that suggest improper configuration of IAC facilities, or over attempts to bypass system security features through URL tampering.
- The BIX log is created by the Business Intelligence Exchange during extract operations.
- The SERVICES-PAL log contains performance data saved from services.
- The CLUSTER log contains information about the setup and run-time behavior of the cluster
Logging level settings:
Use the Logging Level Settings tool to control which logging events appear in the PEGA log. The prlog4j2.xml configuration file defines the levels of logging events.
In a multinode Pega system, you can create separate prlog4j2.xml files for each node.
PegaRULES Log Analyzer (PLA) :
The PegaRULES Log Analyzer (PLA) is a standalone web application that developers and system administrators can use to view summaries of console logs.
The PLA consolidates and summarizes three types of logs : ALERT, PEGA, and Garbage Collection (GC) from individual Pega JVM server nodes in your application system.
- To monitor performance, review the ALERT log. The ALERT log contains diagnostic messages that identify individual system events that exceed performance thresholds or failures.
- To monitor system stability, review the PEGA log. The PEGA log gathers system errors, exceptions, debug statements, and any other messages not specified as alerts.
- For insight into how you Pega application is using memory, monitor the JVM garbage collection log.
The Tracer:
In Pega, the Tracer allows you to capture and view the events that occur during case processing. This allows you to identify the cause of execution errors, such as java exceptions or incorrect property values.
In the Tracer log, most steps return a status of Good, indicating that the step completed successfully. If a step returns a status of Fail, an error occurred and the step completed unsuccessfully.
Tracer displays each event on a separate row. The records display according to the following color code.
- Gray – Activity processing
- Orange – Events from flow, decision, or declarative rules
- Light bule – PegaRULES database and cache operations.
Managing Tracer settings:
Using the Tracer dramatically slows application performance because it is resource intensive. To reduce the impact of running the Tracer, open and configure the Tracer and then pause logging until you are ready to run the application section to troubleshoot.
The toolbar consists of button that enable you to manage the events it captures.
To suspend event logging in the Tracer, click Pause. While the Tracer is paused, Pause is replaced with Play. To resume event logging, click Play.
The Clear button removes all logged events from the screen.
You can save the output from Tracer as an XML file for your records or forward to other people for troubleshooting.
This shows selection options for Events to Trace, Break Condition, General Options, and a partial list of the Event Types to Trace.
You can configure the maximum number of events to display on the screen with the Max Trace Events to Display filed.
if a traced event returns 5001 lines of data for the current settings, the display truncates row 1.
Note: Any increases to the number of events to display also increases your memory footprint and can impact system performance.
You can also downlaod the events without displaying them on the screen. Use zero in the Max Trace Events to Display field to configure that option.
Breakpoints and Watch functions:
You can configure a breakpoint or series of breakpoints to focus on an activity or series of activities that you want to trace.
When the activity starts, the tracer window highlights the event and tracing pauses. Tracing resumes when you click Play or an hour elapses, whichever occurs first.
Note: When a break condition stops the Tracer, the processing on your thread also stops. From the toolbar, click Play to continue processing.
The Watch function is similar to breakpoints, but the watch monitors a specific property value or values to determine if and when the property value changes.
This option is useful to check for property value, calculation consistency, and searching for patterns.
Hope you learned about How To Debugging And Performance In Pega 8.
Note: Performance will be discussed in next post.