Friday, 23 June 2023

How to use Log Category to debug issues in Pega

 Hi Friends, In this post we will see how to use the Log Category to debug the issues.


In Admin studio, Under resources, we have an option Log Category, using this we can debug issues


There are many useful log categories, by reading the description, we can able to understand about the log category usage.



Now assume, I am facing a problem with a declare index rule, In pega there is a log category to enable to log for declare index,  Default log level is ERROR, we have to update the log label to DEBUG to view the log message related to declare index in the log file.

Updating the log level to DEBUG in pxDeclarativeReporter.Save.Index

Click on Reset at 3 dot and change to DEBUG and submit



Now lets see how it is working..

In Data-Admin-Operator-ID class, we have a declare index rule, this rule will trigger when we are saving a operator with the skill.. lets update the operator with a skill and save.



Added skill English and save


Now log should have the information about this declare index details.

Go to Configure -> System -> Operations -> Log -> Log files

Open the pega Logs



In Log file, we can able to view the log information about the logger


We can able to see , in skill page list 1'st index is changed




Similarly, we can able to change the logging level to DEBUG for other log cateogory and debug. Once we have completed the debug, we have to change the log level to ERROR back.

No comments:

Post a Comment