Package ch.qos.logback.classic.sift
Class MDCBasedDiscriminator
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.sift.AbstractDiscriminator<ILoggingEvent>
-
- ch.qos.logback.classic.sift.MDCBasedDiscriminator
-
- All Implemented Interfaces:
Discriminator<ILoggingEvent>,ContextAware,LifeCycle
@Deprecated(since="2022-01-27") public class MDCBasedDiscriminator extends AbstractDiscriminator<ILoggingEvent>
Deprecated.This internal logback API is not supported by AEM as a Cloud Service.MDCBasedDiscriminator essentially returns the value mapped to an MDC key. If the said value is null, then a default value is returned.Both Key and the DefaultValue are user specified properties.
-
-
Constructor Summary
Constructors Constructor Description MDCBasedDiscriminator()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetDefaultValue()Deprecated.java.lang.StringgetDiscriminatingValue(ILoggingEvent event)Deprecated.Return the value associated with an MDC entry designated by the Key property.java.lang.StringgetKey()Deprecated.The key or variable name under which the discriminating value should be exported into the host environment.voidsetDefaultValue(java.lang.String defaultValue)Deprecated.The default MDC value in case the MDC is not set formdcKey.voidsetKey(java.lang.String key)Deprecated.voidstart()Deprecated.-
Methods inherited from class ch.qos.logback.core.sift.AbstractDiscriminator
isStarted, stop
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
-
-
-
-
Method Detail
-
getDiscriminatingValue
public java.lang.String getDiscriminatingValue(ILoggingEvent event)
Deprecated.Return the value associated with an MDC entry designated by the Key property. If that value is null, then return the value assigned to the DefaultValue property.- Returns:
-
start
public void start()
Deprecated.- Specified by:
startin interfaceLifeCycle- Overrides:
startin classAbstractDiscriminator<ILoggingEvent>
-
getKey
public java.lang.String getKey()
Deprecated.Description copied from interface:DiscriminatorThe key or variable name under which the discriminating value should be exported into the host environment.- Returns:
-
setKey
public void setKey(java.lang.String key)
Deprecated.
-
getDefaultValue
public java.lang.String getDefaultValue()
Deprecated.- Returns:
- See Also:
setDefaultValue(String)
-
setDefaultValue
public void setDefaultValue(java.lang.String defaultValue)
Deprecated.The default MDC value in case the MDC is not set formdcKey.For example, if
Keyis set to the value "someKey", and the MDC is not set for "someKey", then this appender will use the default value, which you can set with the help of this method.- Parameters:
defaultValue-
-
-