Support Article
Log Level Settings set to OFF not suppressing InfoForced logging
SA-50521
Summary
Setting logging level to OFF for a particular activity do not suppress the InfoForced log messages appended by using the Log-Message method in the Activity with InfoForced logging level specified.
Error Messages
Not Applicable
Steps to Reproduce
- Create an activity and add a log statements using Log-Message Method and set the LoggingLevel as "InfoForced".
- Set the logging level for the activity in to OFF.
- Run the Activity.
Root Cause
Expected Behavior
Resolution
Here’s the explanation for the reported behavior:
Here is the excerpts from the Help document
https://pdn.pega.com/sites/pdn.pega.com/files/help_v731/procomhelpmain.htm#methods/log-message/log-message.htm
If you choose InfoForced, a message is added to the Pega log each time the method executes, independent of settings in the prlog4j2.xml file or settings through the Set Logging Levels tool.
To reduce clutter in the Pega Log and improve performance, be sure to remove such InfoForced steps, or convert them to comments, in production systems.
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 prlog4j2.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.
Published April 12, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.