@Test public void testPassesNonMetricMarker() { LoggingEvent event = new LoggingEvent(); event.setMarker(MarkerFactory.getMarker("FOO")); MetricBlockFilter filter = new MetricBlockFilter(); filter.start(); assertEquals(FilterReply.NEUTRAL, filter.decide(event)); }
@Override public FilterReply decide(ILoggingEvent event) { Marker eventMarker = event.getMarker(); if (isStarted() && eventMarker != null && eventMarker.contains(MetricPassFilter.METRIC_MARKER)) { return FilterReply.DENY; } return FilterReply.NEUTRAL; }
MetricBlockFilter extends Filter<ILoggingEvent> { @Override public FilterReply decide(ILoggingEvent event) { Marker eventMarker = event.getMarker(); if (isStarted() && eventMarker != null && eventMarker.contains(MetricPassFilter.METRIC_MARKER)) { return FilterReply.DENY; } return FilterReply.NEUTRAL; } }
MetricBlockFilter extends Filter<ILoggingEvent> { @Override public FilterReply decide(ILoggingEvent event) { Marker eventMarker = event.getMarker(); if (isStarted() && eventMarker != null && eventMarker.contains(MetricPassFilter.METRIC_MARKER)) { return FilterReply.DENY; } return FilterReply.NEUTRAL; }  }
MetricBlockFilter extends Filter<ILoggingEvent> { @Override public FilterReply decide(ILoggingEvent event) { Marker eventMarker = event.getMarker(); if (isStarted() && eventMarker != null && eventMarker.contains(MetricPassFilter.METRIC_MARKER)) { return FilterReply.DENY; } return FilterReply.NEUTRAL; }  @Override FilterReply decide(ILoggingEvent event); }
MetricBlockFilter extends Filter<ILoggingEvent> { @Override public FilterReply decide(ILoggingEvent event) { Marker eventMarker = event.getMarker(); if (isStarted() && eventMarker != null && eventMarker.contains(MetricPassFilter.METRIC_MARKER)) { return FilterReply.DENY; } return FilterReply.NEUTRAL; }  @Override FilterReply decide(ILoggingEvent event);  }