What is the log4j2 equivalent of this in yaml?
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMax" value="fatal"/>
<param name="LevelMin" value="error"/>
<param name="AcceptOnMatch" value="true"/>
</filter>
Is this correct?
LevelRangeFilter:
onMatch: accept
minLevel: error
maxLevel: fatal
Just stumbled upon this myself. Here is a minimal
log4j2.yamlfile that sends allERRORevents to STDERR and everything else to STDOUT:Be careful with the
minLevelandmaxLevel, as TRACE > INFO > ERROR in log4j2.