Top Description Fields Constructors Methods
ch.qos.logback.classic.turbo

public Class MDCFilter

extends MatchingFilter
Class Inheritance
Imports
org.slf4j.MDC, .Marker, ch.qos.logback.classic.Level, .Logger, ch.qos.logback.core.spi.FilterReply

This class allows output for a given MDC value.

When the given value is identified by this TurboFilter, the reply is based on the OnMatch option. The information is taken from the MDC. For this TurboFilter to work, one must set the key that will be used to access the information in the MDC.

To allow output for the value, set the OnMatch option to ACCEPT. To disable output for the given value, set the OnMatch option to DENY.

By default, values of the OnMatch and OnMisMatch options are set to NEUTRAL.

Authors
Ceki Gülcü, Sébastien Pennec

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv String
Inherited from ch.qos.logback.classic.turbo.MatchingFilter:
onMatchonMismatch

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FilterReply
decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t)

Implements abstract ch.qos.logback.classic.turbo.TurboFilter.decide.

Make a decision based on the multiple parameters passed as arguments.
public void
setMDCKey(String MDCKey)

public void
public void
Inherited from ch.qos.logback.classic.turbo.MatchingFilter:
setOnMatchsetOnMismatch

Field Detail

MDCKeyback to summary
pack-priv String MDCKey
valueback to summary
pack-priv String value

Constructor Detail

MDCFilterback to summary
public MDCFilter()

Method Detail

decideback to summary
public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t)

Implements abstract ch.qos.logback.classic.turbo.TurboFilter.decide.

Doc from ch.qos.logback.classic.turbo.TurboFilter.decide.

Make a decision based on the multiple parameters passed as arguments. The returned value should be one of FilterReply#DENY, FilterReply#NEUTRAL, or FilterReply#ACCEPT.

Annotations
@Override
setMDCKeyback to summary
public void setMDCKey(String MDCKey)
setValueback to summary
public void setValue(String value)
startback to summary
public void start()

Overrides ch.qos.logback.classic.turbo.TurboFilter.start.

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

Annotations
@Override