@Test public void testTaskOnlyMDCConstant_InMDC() { MDC.put(TASK_LOG_ONLY_MDC, "anything"); assertThat(excludeProgressLogsFilter.decide(event), equalTo(DENY)); }
@Override public FilterReply decide(final ILoggingEvent event) { Marker marker = event.getMarker(); if (MDC.get(TASK_LOG_WITH_PROGRESS_MDC) != null && INTERNAL_PROGRESS.equals(marker)) { return NEUTRAL; } if (DENY_MARKERS.stream().anyMatch(m -> m.equals(marker)) || MDC.get(TASK_LOG_ONLY_MDC) != null) { return DENY; } return NEUTRAL; }
NexusLogFilter extends Filter<ILoggingEvent> { @Override public FilterReply decide(final ILoggingEvent event) { Marker marker = event.getMarker(); if (MDC.get(TASK_LOG_WITH_PROGRESS_MDC) != null && INTERNAL_PROGRESS.equals(marker)) { return NEUTRAL; } if (DENY_MARKERS.stream().anyMatch(m -> m.equals(marker)) || MDC.get(TASK_LOG_ONLY_MDC) != null) { return DENY; } return NEUTRAL; } }
NexusLogFilter extends Filter<ILoggingEvent> { @Override public FilterReply decide(final ILoggingEvent event) { Marker marker = event.getMarker(); if (MDC.get(TASK_LOG_WITH_PROGRESS_MDC) != null && INTERNAL_PROGRESS.equals(marker)) { return NEUTRAL; } if (DENY_MARKERS.stream().anyMatch(m -> m.equals(marker)) || MDC.get(TASK_LOG_ONLY_MDC) != null) { return DENY; } return NEUTRAL; }  }
NexusLogFilter extends Filter<ILoggingEvent> { @Override public FilterReply decide(final ILoggingEvent event) { Marker marker = event.getMarker(); if (MDC.get(TASK_LOG_WITH_PROGRESS_MDC) != null && INTERNAL_PROGRESS.equals(marker)) { return NEUTRAL; } if (DENY_MARKERS.stream().anyMatch(m -> m.equals(marker)) || MDC.get(TASK_LOG_ONLY_MDC) != null) { return DENY; } return NEUTRAL; }  @Override FilterReply decide(final ILoggingEvent event); }
NexusLogFilter extends Filter<ILoggingEvent> { @Override public FilterReply decide(final ILoggingEvent event) { Marker marker = event.getMarker(); if (MDC.get(TASK_LOG_WITH_PROGRESS_MDC) != null && INTERNAL_PROGRESS.equals(marker)) { return NEUTRAL; } if (DENY_MARKERS.stream().anyMatch(m -> m.equals(marker)) || MDC.get(TASK_LOG_ONLY_MDC) != null) { return DENY; } return NEUTRAL; }  @Override FilterReply decide(final ILoggingEvent event);  }