com.evolveum.midpoint.util.logging
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 feature
If 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
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
context |
Method Summary |
ch.qos.logback.core.spi.FilterReply |
decide(org.slf4j.Marker marker,
ch.qos.logback.classic.Logger logger,
ch.qos.logback.classic.Level level,
java.lang.String format,
java.lang.Object[] params,
java.lang.Throwable t)
|
void |
setLevel(java.lang.String loggingLevel)
|
void |
setMDCKey(java.lang.String mdcKey)
|
void |
setMDCValue(java.lang.String mdcValue)
|
void |
setOnMatch(java.lang.String action)
|
void |
setOnMismatch(java.lang.String action)
|
void |
start()
|
Methods inherited from class ch.qos.logback.classic.turbo.TurboFilter |
getName, isStarted, setName, stop |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MDCLevelTurboFilter
public MDCLevelTurboFilter()
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,
java.lang.String format,
java.lang.Object[] params,
java.lang.Throwable t)
- Specified by:
decide
in class ch.qos.logback.classic.turbo.TurboFilter
setOnMatch
public void setOnMatch(java.lang.String action)
- Parameters:
onMatch
- action to set on success
setOnMismatch
public void setOnMismatch(java.lang.String action)
- Parameters:
onMismatch
- the onMismatch to set on failure
setMDCKey
public void setMDCKey(java.lang.String mdcKey)
- Parameters:
mdcKey
- the mdcKey to watch
setMDCValue
public void setMDCValue(java.lang.String mdcValue)
- Parameters:
mdcValue
- the mdcValue to match with MDCkey
setLevel
public void setLevel(java.lang.String loggingLevel)
- Parameters:
level
- the level to breach
start
public void start()
- Specified by:
start
in interface ch.qos.logback.core.spi.LifeCycle
- Overrides:
start
in class ch.qos.logback.classic.turbo.TurboFilter
Copyright © 2012 evolveum. All Rights Reserved.