Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Pega logs and Pega Alerts do not display output as JSON files

SA-52571

Summary



The Pega logs and Pega Alerts do not display the output as JSON files.


Error Messages



Not Applicable


Steps to Reproduce



Unknown


Root Cause



An issue in the custom application code or rules
The appender to the root logger in the prlog4j2.xml file is configured incorrectly.


Resolution

Perform the following local-change:

Add the following two appenders to the prlog4j2.xml file:

<Configuration status="warn">
<Appenders>
---------------------
---------------------
<RollingRandomAccessFile name="PEGAJSON" fileName="${sys:pega.tmpdir}/PegaRULES.json.log" filePattern="${sys:pega.tmpdir}/PegaRULES-%d{MM-dd-yyyy}-%i.json.log.gz">
<JSONLayout />
<Filters>
<!--Deny message logged under ALERT log level-->
<ThresholdFilter level="ALERT" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
<DefaultRolloverStrategy max="20"/>
</RollingRandomAccessFile>

<RollingRandomAccessFile name="ALERTJSON" fileName="${sys:pega.tmpdir}/PegaAlert.json.log" filePattern="${sys:pega.tmpdir}/PegaAlert-%d{MM-dd-yyyy}-%i.json.log.gz">
<JSONLayout />
<ThreadContextMapFilter onMatch="DENY" onMismatch="NEUTRAL" operator="or">
<KeyValuePair key="alertType" value="security"/>
</ThreadContextMapFilter>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
<DefaultRolloverStrategy max="20"/>
</RollingRandomAccessFile>
----------------------
----------------------
</Appenders>

<Loggers>
<asyncRoot>
----------------------
----------------------
<AppenderRef ref="PEGAJSON"/>
<AppenderRef ref="ALERTJSON" level="ALERT"/>
</asyncRoot>
</Loggers>
</Configuration>

Published May 15, 2018 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us