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:
org.apache.logging.log4j.core.pattern.PatternConverter
@Plugin(name="CorrelationIdConverter",
category="Converter")
public final class CorrelationIdConverter
extends org.apache.logging.log4j.core.pattern.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:
-
MdcPatternConverter
-
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
Modifier and TypeMethodDescriptionvoid
format
(org.apache.logging.log4j.core.LogEvent event, StringBuilder toAppendTo) static CorrelationIdConverter
newInstance
(String[] options) Factory method to create a newCorrelationIdConverter
.Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
emptyVariableOutput, format, handlesThrowable, isVariable
Methods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
getName, getStyleClass
-
Method Details
-
format
- Specified by:
format
in classorg.apache.logging.log4j.core.pattern.LogEventPatternConverter
-
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.
-