Top Fields Constructors Methods
ch.qos.logback.classic.pattern

public Class MDCConverter

extends ClassicConverter
Class Inheritance
Imports
ch.qos.logback.classic.spi.ILoggingEvent, java.util.Map

Field Summary

Modifier and TypeField and Description
private String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
convert(ILoggingEvent event)

Implements abstract ch.qos.logback.core.pattern.Converter.convert.

The convert method is responsible for extracting data from the event and storing it for later use by the write method.
public String
getKey()

PrefixCompositeConverter needs the key

private String
outputMDCForAllKeys(Map<String, String> mdcPropertyMap)

if no key is specified, return all the values present in the MDC, in the format "k1=v1, k2=v2, ..."

public void
start()

Overrides ch.qos.logback.core.pattern.DynamicConverter.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

Components that depend on options passed during configuration can override this method in order to make appropriate use of those options.
public void

Field Detail

defaultValueback to summary
private String defaultValue
keyback to summary
private String key

Constructor Detail

MDCConverterback to summary
public MDCConverter()

Method Detail

convertback to summary
public String convert(ILoggingEvent event)

Implements abstract ch.qos.logback.core.pattern.Converter.convert.

Doc from ch.qos.logback.core.pattern.Converter.convert.

The convert method is responsible for extracting data from the event and storing it for later use by the write method.

Annotations
@Override
getKeyback to summary
public String getKey()

PrefixCompositeConverter needs the key

outputMDCForAllKeysback to summary
private String outputMDCForAllKeys(Map<String, String> mdcPropertyMap)

if no key is specified, return all the values present in the MDC, in the format "k1=v1, k2=v2, ..."

startback to summary
public void start()

Overrides ch.qos.logback.core.pattern.DynamicConverter.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

Doc from ch.qos.logback.core.pattern.DynamicConverter.start.

Components that depend on options passed during configuration can override this method in order to make appropriate use of those options. For simpler components, the trivial implementation found in this abstract class will be sufficient.

Annotations
@Override
stopback to summary
public void stop()

Overrides ch.qos.logback.core.pattern.DynamicConverter.stop.

Implements ch.qos.logback.core.spi.LifeCycle.stop.

Annotations
@Override