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