Class MDCLevelTurboFilter
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.classic.turbo.TurboFilter
-
- com.evolveum.midpoint.util.logging.MDCLevelTurboFilter
-
- All Implemented Interfaces:
ch.qos.logback.core.spi.ContextAware
,ch.qos.logback.core.spi.LifeCycle
public class MDCLevelTurboFilter extends ch.qos.logback.classic.turbo.TurboFilter
This class allow output for given MDC value and given level implments logback turbofilter featureIf given value of MDC is found and also level of message reach given level then onMatch action is done else onMissmatch actionis done
Action values: ACCEPT - bypass basic selection rule and follow processing NEUTRAL - follow processing DENY - stop processing
Level values:OFF,ERROR,WARN,INFO,DEBUG,TRACE
- Author:
- mamut
-
-
Constructor Summary
Constructors Constructor Description MDCLevelTurboFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ch.qos.logback.core.spi.FilterReply
decide(org.slf4j.Marker marker, ch.qos.logback.classic.Logger logger, ch.qos.logback.classic.Level level, String format, Object[] params, Throwable t)
void
setLevel(String loggingLevel)
void
setMDCKey(String mdcKey)
void
setMDCValue(String mdcValue)
void
setOnMatch(String action)
void
setOnMismatch(String action)
void
start()
-
Methods inherited from class ch.qos.logback.classic.turbo.TurboFilter
getName, isStarted, setName, stop
-
-
-
-
Method Detail
-
decide
public ch.qos.logback.core.spi.FilterReply decide(org.slf4j.Marker marker, ch.qos.logback.classic.Logger logger, ch.qos.logback.classic.Level level, String format, Object[] params, Throwable t)
- Specified by:
decide
in classch.qos.logback.classic.turbo.TurboFilter
-
setOnMatch
public void setOnMatch(String action)
- Parameters:
action
- the action to set on success
-
setOnMismatch
public void setOnMismatch(String action)
- Parameters:
action
- the onMismatch to set on failure
-
setMDCKey
public void setMDCKey(String mdcKey)
- Parameters:
mdcKey
- the mdcKey to watch
-
setMDCValue
public void setMDCValue(String mdcValue)
- Parameters:
mdcValue
- the mdcValue to match with MDCkey
-
setLevel
public void setLevel(String loggingLevel)
- Parameters:
loggingLevel
- the level to breach
-
start
public void start()
- Specified by:
start
in interfacech.qos.logback.core.spi.LifeCycle
- Overrides:
start
in classch.qos.logback.classic.turbo.TurboFilter
-
-