private void addDenyBLUEFilter() {
   MarkerFilter filter = new MarkerFilter();
   filter.setMarker(BLUE);
   filter.setOnMatch("DENY");
   filter.start();
   context.addTurboFilter(filter);
 }
 private void addAcceptBLUEFilter() {
   MarkerFilter filter = new MarkerFilter();
   filter.setMarker(BLUE);
   filter.setOnMatch("ACCEPT");
   filter.start();
   context.addTurboFilter(filter);
 }
예제 #3
0
 void processScanAttrib(InterpretationContext ic, Attributes attributes) {
   String scanAttrib = ic.subst(attributes.getValue(SCAN_ATTR));
   if (!OptionHelper.isEmpty(scanAttrib) && !"false".equalsIgnoreCase(scanAttrib)) {
     ReconfigureOnChangeFilter rocf = new ReconfigureOnChangeFilter();
     rocf.setContext(context);
     String scanPeriodAttrib = ic.subst(attributes.getValue(SCAN_PERIOD_ATTR));
     if (!OptionHelper.isEmpty(scanPeriodAttrib)) {
       try {
         Duration duration = Duration.valueOf(scanPeriodAttrib);
         rocf.setRefreshPeriod(duration.getMilliseconds());
         addInfo("Setting ReconfigureOnChangeFilter scanning period to " + duration);
       } catch (NumberFormatException nfe) {
         addError("Error while converting [" + scanAttrib + "] to long", nfe);
       }
     }
     rocf.start();
     LoggerContext lc = (LoggerContext) context;
     addInfo("Adding ReconfigureOnChangeFilter as a turbo filter");
     lc.addTurboFilter(rocf);
   }
 }
 private void addNoFilter() {
   NoFilter filter = new NoFilter();
   filter.start();
   context.addTurboFilter(filter);
 }
 private void addYesFilter() {
   YesFilter filter = new YesFilter();
   filter.start();
   context.addTurboFilter(filter);
 }