Question

How t o configure log level for a specific logger permanently

We are on Pega platform v7.4.

You can use the Logging Level Settings tool to temporarily override the severity settings in the prlog4j2.xml.

However, the logging level will be reset for all loggers if the node restart.

Is there a way to configure the log level for a specific logger, so the log level doesn't reset after node restart?

We wanted to keep a specific logger having different log level than others.

***Edited by Moderator Marissa to update platform capability tags****

Correct Answer
October 24, 2019 - 9:54pm

Add below settings to prlog4j2.xml

<Loggers>

    <Logger name="logging_target_class_name_here" additivity="false" level="warn">

        <AppenderRef ref="PEGA"/>

    </Logger>

<Loggers>

 

Useful links:

 

https://logging.apache.org/log4j/2.x/manual/configuration.html

Comments

Keep up to date on this post and subscribe to comments

Pega
October 16, 2019 - 10:51pm

Pega
October 17, 2019 - 1:14am

Hi,

Below link will definitely help:-

https://community.pega.com/knowledgebase/articles/system-administration/log-customization-prloggingxml-file

Please follow the instruction as per the link.

Regards,

-Prakhar

October 24, 2019 - 9:54pm

Add below settings to prlog4j2.xml

<Loggers>

    <Logger name="logging_target_class_name_here" additivity="false" level="warn">

        <AppenderRef ref="PEGA"/>

    </Logger>

<Loggers>

 

Useful links:

 

https://logging.apache.org/log4j/2.x/manual/configuration.html