Question
Adqura
IN
Last activity: 19 Jun 2024 2:56 EDT
How to add a Log Category for Individual Functions in Admin Studio ?
Is it possible to add a log Category for individual functions in Admin Studio , if so how ? By default it only shows me the logger for libraries in the drop-down when I try to create a log category in Admin Studio in Pega 8.8.4 and I am able to add Logger for libraries which would Log for all the functions in that Library Also where would I be able to find the Logger for Functions and Libraries since they do not have the option of "View Java" in their actions which would normally contain the Logger under the "LogHelper" object in it for other rules like activities or report definitions ?
-
Reply
-
Gaurav Raj -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
@GauravR16910691 - Refer the below link and can create custom loggers by using the rule pzInsKey which will be present in View XML option in Actions menu.
Thank you.
Updated: 5 Jun 2024 3:28 EDT
Adqura
IN
Hi @Priyanka Boga, Thanks for replying In the Logger part even after including the inskey which is present in View XML option it does not show anything in the logs This happens only for Functions, for Libraries and other rules it logs correctly Also does the pzInsKey need to have parameter list in it as well like this : "RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN) #20230118T180752.606 GMT" or do I need to change the InsKey in any way before adding it as the Logger
Pegasystems Inc.
IN
@GauravR16910691 - Yes its holds parameters as well because with same name we will have functions but the parameters will be different.
Ex: ValidateSectionIncludes
Thank you.
Updated: 5 Jun 2024 3:45 EDT
Adqura
IN
@Priyanka Boga I tried using these pzInsKey from the View XML but it still didn't work :
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)#20230118T180752.606 GMT
- RULE_UTILITY_FUNCTION_LIBRARY_NAME_FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)#20230118T180752.606 GMT
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)_Action_20230118T180752_606_GMT
Is there any specific format I should use for the pzInsKey of a Function to use it as a Logger in a Log Category ? Or is there any other way we could Log for Individual Functions ?
Pegasystems Inc.
IN
@GauravR16910691 - The log level is set to DEBUG and tried right? For adding loggers only pzInsKey is needed and not required to enclose in quotes.
Thank you.
Updated: 6 Jun 2024 2:52 EDT
Adqura
IN
@Priyanka Boga Yes the Log Level is set to DEBUG and I have not used any Quotes. Just given the pzInsKey as it is Is it possible to set Loggers for individual Functions or the only way to do it is using the logger for the Library itself which would Log for all the Functions in that Library ? Or is there any other procedure to Log Individual Functions instead of logging all the Functions in that Library maybe from Dev Studio itself ?
If there is any other way to log individual functions either from Admin Studio or Dev Studio please do share.
Adqura
IN
Could you give an example of how the pzInsKey would look if I need to add it as a logger I have tried these but they don't seem to work :
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME (STRING,CLIPBOARDPAGE,BOOLEAN)#20230118T180752.606 GMT
- RULE_UTILITY_FUNCTION_LIBRARY_NAME_FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)#20230118T180752.606 GMT
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)_Action_20230118T180752_606_GMT
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)_Action
Am I supposed to change the pzInsKey before adding it as a logger, if so can you please give an example of how it should look ?
Pegasystems Inc.
IN
@GauravR16910691 - Its directly the pzInsKey we should pass from the rule XML fiile. That should work for adding log category for the function.
Thank you.
LTIMindtree
IN
Refer the below link and can create custom loggers by using the rule pzInsKey which will be present in View XML option in Actions menu.
Updated: 6 Jun 2024 5:58 EDT
Adqura
IN
@Bala Veera I tried using the pzInsKey which was there in the View XML options in Action Menu For functions they include parameters and I tried all these pzInsKeys
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)#20230118T180752.606 GMT
- RULE_UTILITY_FUNCTION_LIBRARY_NAME_FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)#20230118T180752.606 GMT
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)_Action_20230118T180752_606_GMT
Are these correct ways of including the pzInsKey of Functions as a Logger while creating a New Logger in Admin Studio or is there any other format of the pzInsKey for Functions ? Or Is there anything else I could do because these don't work .
Updated: 19 Jun 2024 1:37 EDT
Adqura
IN
@Bala Veera Could you give an example of how the pzInsKey would look if I need to add it as a logger I have tried these but they don't seem to work :
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME (STRING,CLIPBOARDPAGE,BOOLEAN)#20230118T180752.606 GMT
- RULE_UTILITY_FUNCTION_LIBRARY_NAME_FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)#20230118T180752.606 GMT
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)_Action_20230118T180752_606_GMT
- RULE-UTILITY-FUNCTION LIBRARY_NAME FUNCTION_NAME--(STRING,CLIPBOARDPAGE,BOOLEAN)_Action
Am I supposed to change the pzInsKey before adding it as a logger, if so can you please give an example of how it should look