Class Converter<E>
java.lang.Object
ch.qos.logback.core.pattern.Converter<E>
- Type Parameters:
E- The type of the event object
- Direct Known Subclasses:
FormattingConverter, LiteralConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringThe convert method is responsible for extracting data from the event and returning a formatted string representation.getNext()Gets the next converter in the chain.final voidSets the next converter in the chain.voidwrite(StringBuilder buf, E event) Formats the event by calling convert() and appends the resulting string to the provided buffer.
-
Constructor Details
-
Converter
public Converter()
-
-
Method Details
-
convert
-
write
Formats the event by calling convert() and appends the resulting string to the provided buffer.- Parameters:
buf- The input buffer where data is appendedevent- The event from where data is extracted
-
setNext
Sets the next converter in the chain. This method can only be called once per converter instance.- Parameters:
next- the next converter to chain- Throws:
IllegalStateException- if next has already been set
-
getNext
-