Details
-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
None
-
None
-
Windows XP
Description
<appender name="Alert" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator name="isAlert">
<expression>marker.getName().equals("Alert")</expression>
</evaluator>
<OnMatch>ACCEPT</OnMatch>
<OnMismatch>DENY</OnMismatch>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>ALERT: %d
[%thread] %-5level %logger
{36} - %msg%n</Pattern>
</layout>
</appender>
In the above example, when an event is logged without an attached marker, the filter returns OnMatch. I would expect that it returns OnMismatch.
A work around for this issue is to change the expression to this:
<expression>marker != null && marker.getName().equals("Alert")</expression>