Class EqualsReplacementConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.pattern.AbstractPatternConverter
-
- org.apache.logging.log4j.core.pattern.LogEventPatternConverter
-
- org.apache.logging.log4j.core.pattern.EqualsBaseReplacementConverter
-
- org.apache.logging.log4j.core.pattern.EqualsReplacementConverter
-
- All Implemented Interfaces:
PatternConverter
@Plugin(name="equals", category="Converter") public final class EqualsReplacementConverter extends EqualsBaseReplacementConverter
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
equals(String str, StringBuilder buff, int from, int len)
Returns true if the specified String equals the specified section of the specified StringBuilder.static EqualsReplacementConverter
newInstance(Configuration config, String[] options)
Gets an instance of the class.-
Methods inherited from class org.apache.logging.log4j.core.pattern.EqualsBaseReplacementConverter
format
-
Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
format, handlesThrowable, isVariable
-
Methods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
getName, getStyleClass
-
-
-
-
Method Detail
-
newInstance
public static EqualsReplacementConverter newInstance(Configuration config, String[] options)
Gets an instance of the class.- Parameters:
config
- The current Configuration.options
- pattern options, an array of three elements: pattern, testString, and substitution.- Returns:
- instance of class.
-
equals
protected boolean equals(String str, StringBuilder buff, int from, int len)
Description copied from class:EqualsBaseReplacementConverter
Returns true if the specified String equals the specified section of the specified StringBuilder.- Specified by:
equals
in classEqualsBaseReplacementConverter
- 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
-
-