public class ContextBasedDiscriminator extends AbstractDiscriminator<ILoggingEvent>
Both Key and the DefaultValue are user specified properties.
started
context
Constructor and Description |
---|
ContextBasedDiscriminator() |
Modifier and Type | Method and Description |
---|---|
String |
getDefaultValue() |
String |
getDiscriminatingValue(ILoggingEvent event)
Return the name of the current context name as found in the logging event.
|
String |
getKey()
The key or variable name under which the discriminating value should be
exported into the host environment.
|
void |
setDefaultValue(String defaultValue)
The default context name in case the context name is not set for the
current logging event.
|
void |
setKey(String key) |
isStarted, start, stop
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
public String getDiscriminatingValue(ILoggingEvent event)
event
- event to evaluatepublic String getKey()
Discriminator
public void setKey(String key)
public String getDefaultValue()
public void setDefaultValue(String defaultValue)
defaultValue
- desired default value