Class EqualsBaseReplacementConverter
java.lang.Object
org.apache.logging.log4j.core.pattern.AbstractPatternConverter
org.apache.logging.log4j.core.pattern.LogEventPatternConverter
org.apache.logging.log4j.core.pattern.EqualsBaseReplacementConverter
- All Implemented Interfaces:
PatternConverter
- Direct Known Subclasses:
EqualsIgnoreCaseReplacementConverter
,EqualsReplacementConverter
Equals pattern converter.
-
Field Summary
Fields inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
LOGGER
Fields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter
CATEGORY
-
Constructor Summary
ModifierConstructorDescriptionprotected
EqualsBaseReplacementConverter
(String name, String style, List<PatternFormatter> formatters, String testString, String substitution, PatternParser parser) Construct the converter. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean
equals
(String str, StringBuilder buff, int from, int len) Returns true if the specified String equals the specified section of the specified StringBuilder.void
format
(LogEvent event, StringBuilder toAppendTo) Formats an event into a string buffer.Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
emptyVariableOutput, format, handlesThrowable, isVariable
Methods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
getName, getStyleClass
-
Constructor Details
-
EqualsBaseReplacementConverter
protected EqualsBaseReplacementConverter(String name, String style, List<PatternFormatter> formatters, String testString, String substitution, PatternParser parser) Construct the converter.- Parameters:
name
- converter namestyle
- converter styleformatters
- The PatternFormatters to generate the text to manipulate.testString
- The test string.substitution
- The substitution string.parser
- The PatternParser.
-
-
Method Details
-
format
Formats an event into a string buffer.- Specified by:
format
in classLogEventPatternConverter
- Parameters:
event
- event to format, may not be null.toAppendTo
- string buffer to which the formatted event will be appended. May not be null.
-
equals
Returns true if the specified String equals the specified section of the specified StringBuilder.- Parameters:
str
- the String to comparebuff
- the StringBuilder to compare a section offrom
- start index in the StringBuilderlen
- length of the section in the StringBuilder- Returns:
- true if equal, false otherwise
-