Class RepeatPatternConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.pattern.AbstractPatternConverter
-
- org.apache.logging.log4j.core.pattern.LogEventPatternConverter
-
- org.apache.logging.log4j.core.pattern.RepeatPatternConverter
-
- All Implemented Interfaces:
PatternConverter
@Plugin(name="repeat", category="Converter") public final class RepeatPatternConverter extends LogEventPatternConverter
Equals pattern converter.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringresult-
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
Constructors Modifier Constructor Description privateRepeatPatternConverter(java.lang.String result)Construct the converter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidformat(java.lang.Object obj, java.lang.StringBuilder toAppendTo)Adds the repeated String to the buffer.private voidformat(java.lang.StringBuilder toAppendTo)voidformat(LogEvent event, java.lang.StringBuilder toAppendTo)Adds the repeated String to the buffer.static RepeatPatternConverternewInstance(Configuration config, java.lang.String[] options)Gets an instance of the class.-
Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
handlesThrowable, isVariable
-
Methods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
getName, getStyleClass
-
-
-
-
Method Detail
-
newInstance
public static RepeatPatternConverter newInstance(Configuration config, java.lang.String[] options)
Gets an instance of the class.- Parameters:
config- The current Configuration.options- pattern options, an array of two elements: repeatString and count.- Returns:
- instance of class.
-
format
public void format(java.lang.Object obj, java.lang.StringBuilder toAppendTo)Adds the repeated String to the buffer.- Specified by:
formatin interfacePatternConverter- Overrides:
formatin classLogEventPatternConverter- Parameters:
obj- event to format, may not be null.toAppendTo- string buffer to which the formatted event will be appended. May not be null.
-
format
public void format(LogEvent event, java.lang.StringBuilder toAppendTo)
Adds the repeated String to the 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.
-
format
private void format(java.lang.StringBuilder toAppendTo)
-
-