Sha256: 372b4ea930cb54573b116d613301574aa79aac6a997d03ac7cc7c20652b48b61
Contents?: true
Size: 767 Bytes
Versions: 4
Compression:
Stored size: 767 Bytes
Contents
package org.embulk.parser.apache.log; import org.apache.commons.lang3.StringUtils; public class LongLogElementFactory implements LogElementFactory<LongLogElement>, Patterns { private String name; private String regexp; public LongLogElementFactory(String name, String regexp) { this.name = name; this.regexp = regexp; } public LongLogElementFactory(String name) { this.name = name; this.regexp = LONG; } @Override public LongLogElement create(String parameter) { if(StringUtils.isEmpty(parameter)){ return new LongLogElement(name, regexp); }else { return new LongLogElement(name + "-" + parameter, regexp); } } }
Version data entries
4 entries across 4 versions & 1 rubygems