'How to convert log4j StringMatchFilter to log4j2?
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
Solution 1:[1]
I think you want RegexFilter for this.
Something like:
<RegexFilter regex=".*Could not remove JaloSession.*" onMatch="DENY" onMismatch="ACCEPT"/>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | StackzOfZtuff |
