Class CorrelationIdConverter
java.lang.Object
org.apache.logging.log4j.core.pattern.AbstractPatternConverter
org.apache.logging.log4j.core.pattern.LogEventPatternConverter
org.springframework.boot.logging.log4j2.CorrelationIdConverter
- All Implemented Interfaces:
PatternConverter
@Plugin(name="CorrelationIdConverter",
category="Converter")
public final class CorrelationIdConverter
extends LogEventPatternConverter
Log4j2
LogEventPatternConverter to convert a CorrelationIdFormatter
pattern into formatted output using data from the MDC.- Since:
- 3.2.0
- Author:
- Phillip Webb
- See Also:
-
Field Summary
Fields inherited from class AbstractPatternConverter
LOGGERFields inherited from interface PatternConverter
CATEGORY -
Method Summary
Modifier and TypeMethodDescriptionvoidformat(LogEvent event, StringBuilder toAppendTo) static CorrelationIdConverternewInstance(String @Nullable [] options) Factory method to create a newCorrelationIdConverter.Methods inherited from class LogEventPatternConverter
emptyVariableOutput, format, handlesThrowable, isVariableMethods inherited from class AbstractPatternConverter
getName, getStyleClass
-
Method Details
-
format
- Specified by:
formatin classLogEventPatternConverter
-
newInstance
Factory method to create a newCorrelationIdConverter.- Parameters:
options- options, may be null or first element contains name of property to format.- Returns:
- instance of PropertiesPatternConverter.
-