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
FieldsModifier and TypeFieldDescriptionprivate final List<PatternFormatter> private final Stringprivate final List<PatternFormatter> private final StringFields inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
LOGGERFields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter
CATEGORY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEqualsBaseReplacementConverter(String name, String style, List<PatternFormatter> formatters, String testString, String substitution, PatternParser parser) Construct the converter. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanequals(String str, StringBuilder buff, int from, int len) Returns true if the specified String equals the specified section of the specified StringBuilder.voidformat(LogEvent event, StringBuilder toAppendTo) Formats an event into a string buffer.(package private) voidparseSubstitution(LogEvent event, StringBuilder substitutionBuffer) Adds the parsed substitution text to the specified buffer.Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
format, handlesThrowable, isVariableMethods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
getName, getStyleClass
-
Field Details
-
formatters
-
substitutionFormatters
-
substitution
-
testString
-
-
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:
formatin 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
-
parseSubstitution
Adds the parsed substitution text to the specified buffer.- Parameters:
event- the current log eventsubstitutionBuffer- the StringBuilder to append the parsed substitution text to
-