class LogErrorsValidator extends GroupLogValidator<Log.error> {

    @Override
    public void validate(Method method, Set<Log.error> target) throws AnnotationUsageException {
        groupAnnotationsByLogger(method, target).entrySet().stream()
                .filter(entry -> entry.getValue().size() > 1)
                .forEach(entry -> {
                    List<Log.error> logErrors = entry.getValue();
                    long filterCount = logErrors.stream()
                            .map(error -> errorFilterFactory.buildErrorFilter(error.ofType(), error.exclude()))
                            .collect(toSet())
                            .size();
                    if (logErrors.size() > filterCount) {
                        throw new AnnotationUsageException(method,
                                format("Duplicated error filters with 'logger = %s' on the method", entry.getKey()),
                                "Optimize error filters or specify a different logger names");
                    }
                });

        target.forEach(logError -> logErrorValidator.validate(method, logError));
    }

    public  LogErrorsValidator(Map<String, Set<String>> loggerNames,
                              LogErrorValidator logErrorValidator);

}