I am trying to setup a simple evaluator for an appender. I want certain debug
messages to be emailed, while the default will just go to stdout.
Here is my context (note for this test both appenders output to the
console, although one is named EMAIL):
<configuration>
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n</pattern>
</encoder>
</appender>
<appender name="EMAIL"
class="ch.qos.logback.core.ConsoleAppender">
<evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
<marker>NOTIFY_ADMIN</marker>
</evaluator>
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root>
<level value="debug" />
<appender-ref ref="STDOUT" />
<appender-ref ref="EMAIL" />
</root>
</configuration>
The context gives the following error:
07:30:14,121 |-ERROR in ch.qos.logback.core.joran.spi.interpre...@19:72 - no
applicable action for [evaluator], current pattern is
[[configuration][appender][evaluator]]
07:30:14,121 |-ERROR in ch.qos.logback.core.joran.spi.interpre...@20:15 - no
applicable action for [marker], current pattern is
[[configuration][appender][evaluator][marker]]
Any ideas?
Also, can you describe the difference between and evaluator and a filter?
-----
Buzzterrier
http://buzzterrier.blogspot.com/ View my blog: Ordinary Average Developer...
--
View this message in context:
http://old.nabble.com/Evaluators-and-Markers----no-applicable-action-tp28609431p28609431.html
Sent from the Logback User mailing list archive at Nabble.com.
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user