Question
VirtusaPolaris
VirtusaPolaris
IN
VirtusaPolaris
Posted: Nov 15, 2018
Last activity: Nov 15, 2018
Last activity: 15 Nov 2018 11:00 EST
Closed
RegexFilter does not match multiline log messages
After upgrade from Pega Marketing 7.2.1 to 7.3.1, updated log4j2.xml for custom loggers.
<RollingRandomAccessFile name="PEGA" fileName="/somepath/PegaRULES.log" filePattern="/somepath/PegaRULES-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout>
<Pattern>some pattern</Pattern>
</PatternLayout>
<Filters>
<!--Deny message logged under ALERT log level-->
<ThresholdFilter level="ALERT" onMatch="DENY" onMismatch="NEUTRAL"/>
<RegexFilter regex=".*ABC_Logger.*" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
If the log message contains "\n", the message is going to PegaRULES.log instead of custome logger. It works fine if there is no line break.