Log-Message method |
Use the Log-Message method to append a message to the Pega log when the step is reached. Depending on method parameters and the current logging level, a line is added to the Pega log on the current node.
Additions to the Pega log consume system resources. Select the LoggingLevel parameter carefully. For best performance, remove or convert to comments the steps containing this method when they are no longer needed.
The Log-Message method accepts four parameters:
If the LoggingLevel parameter is set to InfoForced
, a message is added to the Pega log on the current node.
If the LoggingLevel parameter is set to Debug
, Info
, Warn
, or Error
, results of this method depend on a comparison of the LoggingLevel parameter with the prlogging.xml
setting on the current node for the Rule-Obj-Activity class. If the value of the parameter is equal to or greater than the severity value of the setting, the message is added to the log and other processing occurs as described above. You can temporarily override the setting in the prlogging.xml
file using the Set Logging Level tool. Severity levels range from DEBUG
(lowest level, most messages) to INFO
, WARN
, ERROR
, and FATAL
(highest level, fewest messages).
If requested, a Java stack trace is also added to the Pega log. If requested, a Tracer event is generated. These events appear in Tracer output if the Log-Message checkbox is selected on the Tracer Options form.
When debugging is complete, you can delete the steps that use this method or change them to comment steps. This is needed for steps where LoggingLevel is set to InfoForced
. For others, if the prlogging.xml
setting for the Rule-Obj-Activity class is higher than the LoggingLevel parameter, executing this method does not update the Pega log and does not affect performance.
This method updates the pxMethodStatus property. See How to test method results using a transition.
This method is a wrapper for the Java LogHelper class for logging diagnostic data. When practical, use this method rather than a Java step to add to the Pega log.
Pega log file | |
About the Set Logging Levels tool |