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 SummaryFields inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverterLOGGERFields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverterCATEGORY
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedEqualsBaseReplacementConverter(String name, String style, List<PatternFormatter> formatters, String testString, String substitution, PatternParser parser) Construct the converter.
- 
Method SummaryModifier 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.booleanTests whether this pattern converter is renders aThrowable.Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverteremptyVariableOutput, format, isVariableMethods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConvertergetName, getStyleClass
- 
Constructor Details- 
EqualsBaseReplacementConverterprotected EqualsBaseReplacementConverter(String name, String style, List<PatternFormatter> formatters, String testString, String substitution, PatternParser parser) Construct the converter.- Parameters:
- name- converter name
- style- converter style
- formatters- The PatternFormatters to generate the text to manipulate.
- testString- The test string.
- substitution- The substitution string.
- parser- The PatternParser.
 
 
- 
- 
Method Details- 
formatFormats an event into a string buffer.- Specified by:
- formatin class- LogEventPatternConverter
- Parameters:
- event- event to format, may not be null.
- toAppendTo- string buffer to which the formatted event will be appended. May not be null.
 
- 
equalsReturns true if the specified String equals the specified section of the specified StringBuilder.- Parameters:
- str- the String to compare
- buff- the StringBuilder to compare a section of
- from- start index in the StringBuilder
- len- length of the section in the StringBuilder
- Returns:
- true if equal, false otherwise
 
- 
handlesThrowablepublic boolean handlesThrowable()Description copied from class:LogEventPatternConverterTests whether this pattern converter is renders aThrowable.The PatternParserchecks this flag when processing thealwaysWriteExceptionsoption: if no converter in the pattern handles throwables, the parser automatically appends a converter to ensure exceptions are still written.- Overrides:
- handlesThrowablein class- LogEventPatternConverter
- Returns:
- trueif this converter consumes and renders a- Throwable,- falseotherwise
 
 
-