public class MDCConverter extends ClassicConverter
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
defaultValue |
private java.lang.String |
key |
started| Constructor and Description |
|---|
MDCConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
convert(ILoggingEvent event)
The convert method is responsible for extracting data from the event and
storing it for later use by the write method.
|
private java.lang.String |
outputMDCForAllKeys(java.util.Map<java.lang.String,java.lang.String> mdcPropertyMap)
if no key is specified, return all the values present in the MDC, in the format "k1=v1, k2=v2, ..."
|
void |
start()
Components that depend on options passed during configuration can override
this method in order to make appropriate use of those options.
|
void |
stop() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getFirstOption, getOptionList, isStarted, setContext, setOptionListgetFormattingInfo, setFormattingInfo, writepublic void start()
DynamicConverterstart in interface LifeCyclestart in class DynamicConverter<ILoggingEvent>public void stop()
stop in interface LifeCyclestop in class DynamicConverter<ILoggingEvent>public java.lang.String convert(ILoggingEvent event)
Converterconvert in class Converter<ILoggingEvent>private java.lang.String outputMDCForAllKeys(java.util.Map<java.lang.String,java.lang.String> mdcPropertyMap)