I'm currently facing a problem to convert the StringMatchFilter from Log4j to Log4j2. I couldn't find any other filter in version 2, so I'm kinda stuck here.
log4j.appender.CONSOLE.filter.1=org.apache.log4j.varia.StringMatchFilter
log4j.appender.CONSOLE.filter.1.AcceptOnMatch=false
log4j.appender.CONSOLE.filter.1.StringToMatch=Could not remove JaloSession
JaloSession
Try using MarkerFilter. MarkerFilter will do same job. Example:
<Filters>
<MarkerFilter marker="STR1" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="Str2" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>