I am trying to add a new logger in the prlog4j2.xml and want to map all log-message written in the application should fall in to the new logger as well. SO that i can have a dedicated logfile for all the log-mesage written.
Is there any default category name which we can use to implement.
@AbhishekkKhanna To create a dedicated log file for all log-message events, you can create a custom log category in Pega Platform. Follow these steps:
In Dev Studio, click Records > SysAdmin > Log Category, and then click Create.
Enter a short description and a logger category name, and then click Create and open.
Enter a description of your log category.
From the Log Level dropdown list, select a default log level for your category.
Associate loggers with your category by clicking +Add logger and entering logger names in the Logger Name field. For log-message events, use the logger name: 'com.pega.pegarules.exec.internal.rules.methods.MethodLogMessage'.
After creating the custom log category, update the prlog4j2.xml file to include the new appender for the custom log file. Make sure the logger name matches the one you used in the custom log category.
This answer came from a Pega gen-AI assistant using the below references. As a Support Center moderator, I reviewed the answer and references for accuracy: