Class StringMatchFilter.Builder
java.lang.Object
org.apache.logging.log4j.core.filter.AbstractFilter.AbstractFilterBuilder<StringMatchFilter.Builder>
org.apache.logging.log4j.core.filter.StringMatchFilter.Builder
- All Implemented Interfaces:
Builder<StringMatchFilter>
- Enclosing class:
StringMatchFilter
public static class StringMatchFilter.Builder
extends AbstractFilter.AbstractFilterBuilder<StringMatchFilter.Builder>
implements Builder<StringMatchFilter>
-
Field Summary
FieldsFields inherited from class AbstractFilter.AbstractFilterBuilder
ATTR_ON_MATCH, ATTR_ON_MISMATCH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the object after all configuration has been set.setMatchString(String text) Deprecated.Sets the text to search in event messages.Methods inherited from class AbstractFilter.AbstractFilterBuilder
asBuilder, getOnMatch, getOnMismatch, setOnMatch, setOnMismatchMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
getErrorPrefix, isValid
-
Field Details
-
text
@PluginBuilderAttribute @Required(message="No text provided for StringMatchFilter") private String text
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setMatchString
Deprecated.since 2.25.0, usesetText(String)instead. -
setText
Sets the text to search in event messages.- Parameters:
text- the text to search in event messages.- Returns:
- this instance.
- Since:
- 2.25.0
-
build
Description copied from interface:BuilderBuilds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
buildin interfaceBuilder<StringMatchFilter>- Returns:
- the configured instance.
-
setText(String)instead.