View | Details | Raw Unified | Return to bug 63442
Collapse All | Expand All

(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/AccessLogSamplerBeanInfo.java (-3 / +14 lines)
Lines 24-29 Link Here
24
24
25
import java.beans.PropertyDescriptor;
25
import java.beans.PropertyDescriptor;
26
import java.io.IOException;
26
import java.io.IOException;
27
import java.util.Collections;
27
import java.util.List;
28
import java.util.List;
28
29
29
import org.apache.jmeter.protocol.http.util.accesslog.Filter;
30
import org.apache.jmeter.protocol.http.util.accesslog.Filter;
Lines 37-43 Link Here
37
38
38
public class AccessLogSamplerBeanInfo extends BeanInfoSupport {
39
public class AccessLogSamplerBeanInfo extends BeanInfoSupport {
39
    private static final Logger log = LoggerFactory.getLogger(AccessLogSamplerBeanInfo.class);
40
    private static final Logger log = LoggerFactory.getLogger(AccessLogSamplerBeanInfo.class);
41
    private static final List<String> LOG_PARSER_CLASSES = logParsers();
40
42
43
    private static List<String> logParsers() {
44
        try {
45
            return ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { LogParser.class });
46
        } catch (IOException e) {
47
            log.warn("Could not find log parsers.", e);
48
            return Collections.emptyList();
49
        }
50
    }
51
41
    public AccessLogSamplerBeanInfo() {
52
    public AccessLogSamplerBeanInfo() {
42
        super(AccessLogSampler.class);
53
        super(AccessLogSampler.class);
43
        log.debug("Entered access log sampler bean info");
54
        log.debug("Entered access log sampler bean info");
Lines 58-66 Link Here
58
            p.setValue(DEFAULT, AccessLogSampler.DEFAULT_CLASS);
69
            p.setValue(DEFAULT, AccessLogSampler.DEFAULT_CLASS);
59
            p.setValue(NOT_OTHER, Boolean.TRUE);
70
            p.setValue(NOT_OTHER, Boolean.TRUE);
60
            p.setValue(NOT_EXPRESSION, Boolean.TRUE);
71
            p.setValue(NOT_EXPRESSION, Boolean.TRUE);
61
            final List<String> logParserClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { LogParser.class });
72
            
62
            log.debug("found parsers: {}", logParserClasses);
73
            log.debug("found parsers: {}", LOG_PARSER_CLASSES);
63
            p.setValue(TAGS, logParserClasses.toArray(new String[logParserClasses.size()]));
74
            p.setValue(TAGS, LOG_PARSER_CLASSES.toArray(new String[LOG_PARSER_CLASSES.size()]));
64
75
65
            p = property("filterClassName"); // $NON-NLS-1$
76
            p = property("filterClassName"); // $NON-NLS-1$
66
            p.setValue(NOT_UNDEFINED, Boolean.FALSE);
77
            p.setValue(NOT_UNDEFINED, Boolean.FALSE);

Return to bug 63442