Module ch.qos.logback.access.common
Class AccessEventDiscriminator
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.sift.AbstractDiscriminator<IAccessEvent>
ch.qos.logback.access.common.sift.AccessEventDiscriminator
- All Implemented Interfaces:
ch.qos.logback.core.sift.Discriminator<IAccessEvent>
,ch.qos.logback.core.spi.ContextAware
,ch.qos.logback.core.spi.LifeCycle
public class AccessEventDiscriminator
extends ch.qos.logback.core.sift.AbstractDiscriminator<IAccessEvent>
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) getKey()
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
-
getRawDiscriminatingValue
-
start
- Specified by:
start
in interfacech.qos.logback.core.spi.LifeCycle
- Overrides:
start
in classch.qos.logback.core.sift.AbstractDiscriminator<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
-
setKey
-