Process line.

        Overwrite BaseFilter.accept() and return True if the provided
        logevent should be accepted (causing output), or False if not.
975461
def accept(self, logevent):
        
        if self.fromReached and self.seek_to:
            if self.seek_to != -1:
                self.toReached = (self.mlogfilter.args['logfile'][0]
                                  .filehandle.tell() >= self.seek_to)
            return True
        else:
            # slow version has to check each datetime
            dt = logevent.datetime

            # if logevent has no datetime, accept if between --from and --to
            if dt is None:
                return self.fromReached

            if self.fromDateTime <= dt <= self.toDateTime:
                self.toReached = False
                self.fromReached = True
                return True

            elif dt > self.toDateTime:
                self.toReached = True
                return False

            else:
                return False
157666
private boolean processLine(final CommandLine line, final Options options)
            throws Exception {
        if (line.hasOption(OPTION_VERSION)) {
            log.info(getVersion(true));
            return false;
        }
        if (line.hasOption(OPTION_HELP)) {
            produceHelp(options);
            return false;
        }
        if (line.hasOption(OPTION_INPUT)) {
            setXsdInput(line.getOptionValue(OPTION_INPUT).trim());
        }
        if (line.hasOption(OPTION_OUTPUT)) {
            setOutput(line.getOptionValue(OPTION_OUTPUT).trim());
        }
        if (line.hasOption(OPTION_AVRO_NAMESPACE_PREFIX)) {
            setAvroNamespacePrefix(line.getOptionValue(OPTION_AVRO_NAMESPACE_PREFIX).trim());
        }

        return true;
    }
1022161
boolean accept() {
        // Assert that the classpath element is included
        if (!_includePredicate.test(_ctClass)) {
            _log.debug("Class is not included: " + _ctClass.getName());
            return false;
        }

        // Assert that the classpath element is not excluded
        if (_excludePredicate.test(_ctClass)) {
            _log.debug("Class is excluded: " + _ctClass.getName());
            return false;
        }

        // Assert that the class is not frozen
        if (_ctClass.isFrozen()) {
            _log.debug("Class is frozen: " + _ctClass.getName());
            return false;
        }

        // Assert that the processor accepts the classpath element
        if (!_processor.accept(_ctClass)) {
            _log.debug("Class is not accepted: " + _ctClass.getName());
            return false;
        }

        // Assert that this processor has not already been run
        if (isAlreadyProcessed(_ctClass, _processor)) {
            _log.info("Class already processed: " + _ctClass.getName());
            return false;
        }

        return true;
    }
1203306
private boolean filter(Event event) {
        if (null == filters) return false;

        for (EventFilter filter : filters) {
            if (filter.filter(event)) {
                return true;
            }
        }
        return false;
    }
789750
def accept_line(event):
    "  "
    b = event.current_buffer
    b.accept_action.validate_and_handle(event.cli, b)
40275
private boolean acceptValue(int row, Map<Integer, Object> filter) {
		boolean accept = true;
		Set<Integer> keys = filter.keySet();
		for (int index : keys) {
			if (!filter.get(index).equals(dataSource.getValueAt(row, fields.get(index)))) {
				// System.out.println(" + " + filter.get(j));
				// System.out.println(" - " + dataSource.getValueAt(i,
				// fields.get(j)));
				return false;
			}
		}

		return accept;
	}
1234219
@Override
    public final void onApplicationEvent(E event) {
        for (final ApplicationEventFilter<E> applicationEventFilter :
                this.applicationEventFilters) {
            if (!applicationEventFilter.supports(event)) {
                logger.debug(
                        "Filter {} does not support event {} it will be ignored",
                        applicationEventFilter,
                        event);
                return;
            }
        }

        this.onFilteredApplicationEvent(event);
    }
198796
public void process(EventPipeline eventPipeline, EventBase<?> event) {
        try {
            for (HandlerReference hdlr : this) {
                try {
                    hdlr.invoke(event);
                    if (event.isStopped()) {
                        break;
                    }
                } catch (AssertionError t) {
                    // JUnit support
                    CoreUtils.setAssertionError(t);
                    event.handlingError(eventPipeline, t);
                } catch (Error e) { // NOPMD
                    // Wouldn't have caught it, if it was possible.
                    throw e;
                } catch (Throwable t) { // NOPMD
                    // Errors have been rethrown, so this should work.
                    event.handlingError(eventPipeline, t);
                }
            }
        } finally { // NOPMD
            try {
                event.handled();
            } catch (AssertionError t) {
                // JUnit support
                CoreUtils.setAssertionError(t);
                event.handlingError(eventPipeline, t);
            } catch (Error e) { // NOPMD
                // Wouldn't have caught it, if it was possible.
                throw e;
            } catch (Throwable t) { // NOPMD
                // Errors have been rethrown, so this should work.
                event.handlingError(eventPipeline, t);
            }
        }
    }
488166
public boolean accept(File f) {
        if (f != null) {
            if (f.isDirectory()) {
                return false;
            }
            String extension = getExtension(f);
            if (extension != null && filters.get(getExtension(f)) != null) {
                return true;
            }
        }
        return false;
    }
419168
private boolean putInBuffer(final LoggingEvent event) {
        putInBufferCounter.increment();
        Stopwatch t = putBufferTimeTracer.start();
        boolean hasPut = false;
        if (batcher.process(event)) {
            hasPut = true;
        } else {
            hasPut = false;
        }
        t.stop();
        return hasPut;
    }
177777
private void processLoggingEvents(List<LoggingEvent> loggingEvents) {
        // Lazy initialization of the appender. This is needed because the
        // original appenders configuration may be available only after the
        // complete
        // log4j initialization.
        while (appenders.getAllAppenders() == null) {
            if ((batcher == null) || (batcher.isPaused())) {
                try {
                    Thread.sleep(SLEEP_TIME_MS);
                } catch (InterruptedException ignore) {

                }
                continue;
            }

            org.apache.log4j.Logger asyncLogger = LoggerCache.getInstance()
                    .getOrCreateLogger(LOGGER_ASYNC_APPENDER);
            Appender originalAppender = asyncLogger
                    .getAppender(originalAppenderName);
            if (originalAppender == null) {
                try {
                    Thread.sleep(SLEEP_TIME_MS);
                } catch (InterruptedException ignore) {

                }
                continue;
            }
            appenders.addAppender(originalAppender);
        }
        // First take the overflown summary events and put it back in the queue
        for (Iterator<Entry<String, LogSummary>> iter = logSummaryMap
                .entrySet().iterator(); iter.hasNext();) {
            Entry<String, LogSummary> mapEntry = (Entry<String, LogSummary>) iter
                    .next();
            // If the space is not available, then exit immediately
            if (batcher.isSpaceAvailable()) {
                LogSummary logSummary = mapEntry.getValue();
                LoggingEvent event = logSummary.createEvent();
                // Put the event in the queue and remove the event from the summary
                if (batcher.process(event)) {
                    iter.remove();
                } else {
                    break;
                }
            } else {
                break;
            }

        }
        // Process the events from the queue and call the underlying
        // appender
        for (LoggingEvent event : loggingEvents) {
            appenders.appendLoopOnAppenders(event);

        }

    }
1190784
public void doAppend(LoggingEvent event)
    {
        if(closed) {
            LogLog.error("Attempted to append to closed appender named [" + name + "].");
            return;
        }

        if(!isAsSevereAsThreshold(event.getLevel())) {
            return;
        }

        Filter f = this.headFilter;

        FILTER_LOOP:
        while(f != null) {
            switch(f.decide(event)) {
            case Filter.DENY: return;
            case Filter.ACCEPT: break FILTER_LOOP;
            case Filter.NEUTRAL: f = f.getNext();
            }
        }

        this.append(event);
    }
554732
def include_message?(log)
      return true if @filter.nil?

      if @filter.is_a?(Regexp)
        !(@filter =~ log.name).nil?
      elsif @filter.is_a?(Proc)
        @filter.call(log) == true
      end
    end
611520
private Boolean acceptRecursive(V value) {

    Boolean result = null;
    if (this.parent != null) {
      result = this.parent.acceptRecursive(value);
      if (result != null) {
        return result;
      }
    }
    for (FilterRule<V> rule : this.rules) {
      result = rule.accept(value);
      if (result != null) {
        return result;
      }
    }
    return result;
  }
106797
function accepts(type, event) {
        if (typeof type === 'boolean') return type;
        if (typeof type === 'string') return accepts([type], event);
        if (Array.isArray(type)) {
          return accepts(function (types) {
            return types.some(function (_type) {
              return type.indexOf(_type) !== -1;
            });
          }, event);
        }
        if (typeof type === 'function') return type(toArray(event.dataTransfer.types));

        return false;
      }
670897
public void accept(XVisitor visitor, XLog log) {
		/*
		 * First call.
		 */
		visitor.visitExtensionPre(this, log);
		/*
		 * Last call.
		 */
		visitor.visitExtensionPost(this, log);
	}
335484
protected void process(BufferedReader bufferedReader) throws IOException {
        Matcher eventMatcher;
        Matcher exceptionMatcher;
        String line;
        while ((line = bufferedReader.readLine()) != null) {
            //skip empty line entries
            eventMatcher = regexpPattern.matcher(line);
            if (line.trim().equals("")) {continue;}
            exceptionMatcher = exceptionPattern.matcher(line);
            if (eventMatcher.matches()) {
                //build an event from the previous match (held in current map)
                LoggingEvent event = buildEvent();
                if (event != null) {
                    if (passesExpression(event)) {
                        doPost(event);
                    }
                }
                currentMap.putAll(processEvent(eventMatcher.toMatchResult()));
            } else if (exceptionMatcher.matches()) {
                //an exception line
                additionalLines.add(line);
            } else {
                //neither...either post an event with the line or append as additional lines
                //if this was a logging event with multiple lines, each line will show up as its own event instead of being
                //appended as multiple lines on the same event..
                //choice is to have each non-matching line show up as its own line, or append them all to a previous event
                if (appendNonMatches) {
                    //hold on to the previous time, so we can do our best to preserve time-based ordering if the event is a non-match
                    String lastTime = (String)currentMap.get(TIMESTAMP);
                    //build an event from the previous match (held in current map)
                    if (currentMap.size() > 0) {
                        LoggingEvent event = buildEvent();
                        if (event != null) {
                            if (passesExpression(event)) {
                              doPost(event);
                            }
                        }
                    }
                    if (lastTime != null) {
                        currentMap.put(TIMESTAMP, lastTime);
                    }
                    currentMap.put(MESSAGE, line);
                } else {
                    additionalLines.add(line);
                }
            }
        }

        //process last event if one exists
        LoggingEvent event = buildEvent();
        if (event != null) {
            if (passesExpression(event)) {
                doPost(event);
            }
        }
    }