@Override
    public boolean accept(RepositoryLogRecord record) {
        if (checkDate) {
            if (record.getMillis() > endDate || startDate > record.getMillis())
                return false;
        }
        if (levelFilter != null && !levelFilter.accept(record)) {
            return false;
        }
        String message = (record.getFormattedMessage() != null) ? record.getFormattedMessage() : record.getRawMessage();
        if (this.messageContent != null) { // If messageContentChecking, get proper field and do contains
            boolean match = false;
            for (Pattern pattern : this.messageContent) {
                if (pattern.matcher(message).find()) {
                    match = true;
                    break;
                }
            }
            if (!match) {
                return false;
            }
        }
        if (this.excludeMessages != null) { // If excludeMessages checking, any match means record does not meet criteria and not to include
            boolean matchExcMessage = false;
            for (Pattern excMessage : this.excludeMessages) {
                if (excMessage.matcher(message).find()) {
                    matchExcMessage = true;
                    break;
                }
            }
            if (matchExcMessage) {
                return false;
            }
        }
        String loggerName = record.getLoggerName();
        if (this.includeLoggers != null) { // If includeLogger checking, look for a match to any in the array
            boolean matchIncLogger = false;
            for (Pattern incLogger : this.includeLoggers) {
                if (loggerName != null && incLogger.matcher(loggerName).find()) {
                    matchIncLogger = true;
                    break;
                }
            }
            if (!matchIncLogger)
                return false;
        }
        if (this.excludeLoggers != null) { // If excludeLogger checking, any match means record does not meet criteria
            for (Pattern excLogger : this.excludeLoggers) {
                if (loggerName != null && excLogger.matcher(loggerName).find())
                    return false;
            }
        }
        if (this.threadIDs != null) { // If thread checking, simple int equality on anything in array passes test
            for (int hexThread : this.threadIDs) {
                if (hexThread == record.getThreadID())
                    return true;
            }
            return false;
        }
        return true;
    }
@ Override public boolean accept ( RepositoryLogRecord record ) { if ( checkDate ) { if ( record . getMillis ( ) > endDate || startDate > record . getMillis ( ) ) return false ; } if ( levelFilter != null && ! levelFilter . accept ( record ) ) { return false ; } String message = ( record . getFormattedMessage ( ) != null ) ? record . getFormattedMessage ( ) : record . getRawMessage ( ) ; if ( this . messageContent != null ) { boolean match = false ; for ( Pattern pattern : this . messageContent ) { if ( pattern . matcher ( message ) . find ( ) ) { match = true ; break ; } } if ( ! match ) { return false ; } } if ( this . excludeMessages != null ) { boolean matchExcMessage = false ; for ( Pattern excMessage : this . excludeMessages ) { if ( excMessage . matcher ( message ) . find ( ) ) { matchExcMessage = true ; break ; } } if ( matchExcMessage ) { return false ; } } String loggerName = record . getLoggerName ( ) ; if ( this . includeLoggers != null ) { boolean matchIncLogger = false ; for ( Pattern incLogger : this . includeLoggers ) { if ( loggerName != null && incLogger . matcher ( loggerName ) . find ( ) ) { matchIncLogger = true ; break ; } } if ( ! matchIncLogger ) return false ; } if ( this . excludeLoggers != null ) { for ( Pattern excLogger : this . excludeLoggers ) { if ( loggerName != null && excLogger . matcher ( loggerName ) . find ( ) ) return false ; } } if ( this . threadIDs != null ) { for ( int hexThread : this . threadIDs ) { if ( hexThread == record . getThreadID ( ) ) return true ; } return false ; } return true ; }
filter current record per criteria passed in. Date filtering done prior to filter invocation
any failure of a criteria results in a false return (ie: don't accept record)

@param record RepositoryLogRecord to filter
@return true or false as to keeping this record