我正在尝试编写一个接受所有标记的附加程序logstash-logback-encoder
我已经尝试了以下使用 logback1.0.7
和logstash-logback-encoder
4.6
<appender name="LOGSTASH" class="ch.qos.logback.classic.sift.SiftingAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
<!-- Accept only Markers from logstash-logback-encoder -->
<marker>LS_*</marker>
</evaluator>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
……
但是它不起作用。似乎没有任何东西进入这个附加程序。
下面的过滤工作位相当繁琐
<evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
<!-- Accepts only Markers from logstash-logback-encoder -->
<marker>LS_MAP_FIELDS</marker>
<marker>LS_OBJECT_FIELDS</marker>
<marker>LS_APPEND_</marker>
<marker>LS_APPEND_OBJECT</marker>
<marker>LS_APPEND_RAW</marker>
</evaluator>