Package ch.qos.logback.access.sift
Class AccessEventDiscriminator
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.sift.AbstractDiscriminator<IAccessEvent>
ch.qos.logback.access.sift.AccessEventDiscriminator
- All Implemented Interfaces:
Discriminator<IAccessEvent>
,ContextAware
,LifeCycle
AccessEventDiscriminator's job is to return the value of a designated field
in an
IAccessEvent
instance.
The field is specified via the AccessEventDiscriminator.FieldName
property.
- Author:
- Ceki Gülcü
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
At present time the followed fields can be designated: COOKIE, REQUEST_ATTRIBUTE, SESSION_ATTRIBUTE, REMOTE_ADDRESS, LOCAL_PORT,REQUEST_URI -
Field Summary
Fields inherited from class ch.qos.logback.core.sift.AbstractDiscriminator
started
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDiscriminatingValue
(IAccessEvent acccessEvent) Given event 'e' return a discriminating value.getKey()
The key or variable name under which the discriminating value should be exported into the host environment.getRawDiscriminatingValue
(IAccessEvent acccessEvent) void
setAdditionalKey
(String additionalKey) void
setDefaultValue
(String defaultValue) The default value returned by this discriminator in case it cannot compute the discriminating value from the access event.void
setFieldName
(AccessEventDiscriminator.FieldName fieldName) void
void
start()
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, getDeclaredOrigin, getStatusManager, setContext
-
Constructor Details
-
AccessEventDiscriminator
public AccessEventDiscriminator()
-
-
Method Details
-
getDiscriminatingValue
Description copied from interface:Discriminator
Given event 'e' return a discriminating value.- Returns:
-
getRawDiscriminatingValue
-
start
- Specified by:
start
in interfaceLifeCycle
- Overrides:
start
in classAbstractDiscriminator<IAccessEvent>
-
setFieldName
-
getFieldName
-
getAdditionalKey
-
setAdditionalKey
-
getDefaultValue
- Returns:
- See Also:
-
setDefaultValue
The default value returned by this discriminator in case it cannot compute the discriminating value from the access event.- Parameters:
defaultValue
-
-
getKey
Description copied from interface:Discriminator
The key or variable name under which the discriminating value should be exported into the host environment.- Returns:
-
setKey
-