-
- All Superinterfaces:
Condition,ContextAware,LifeCycle
- All Known Implementing Classes:
ExpressionPropertyCondition,IsPropertyDefinedCondition,IsPropertyNullCondition,PropertyConditionBase,PropertyEqualityCondition
public interface PropertyCondition extends Condition, ContextAware, LifeCycle
Interface for evaluating conditions based on properties during the conditional processing of Logback configuration files. This interface is intended to provide an alternative to legacy Janino-based evaluation.Implementations of this interface can access both global properties from the
Contextand local properties specific to the embedding configurator instance. This allows for fine-grained and context-aware evaluation of configuration conditions.Typical usage involves implementing this interface to provide custom logic for evaluating whether certain configuration blocks should be included or excluded based on property values.
- Since:
- 1.5.20
- Author:
- Ceki Gülcü
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PropertyContainergetLocalPropertyContainer()Returns the localPropertyContainerused for property lookups specific to the embedding configurator.voidsetLocalPropertyContainer(PropertyContainer aPropertyContainer)Sets aPropertyContainerspecific to the embedding configurator, which is used for property lookups in addition to the globalContextproperties.-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Method Detail
-
getLocalPropertyContainer
PropertyContainer getLocalPropertyContainer()
Returns the localPropertyContainerused for property lookups specific to the embedding configurator. This is distinct from the globalContextproperty container.- Returns:
- the local property container, or null if not set
-
setLocalPropertyContainer
void setLocalPropertyContainer(PropertyContainer aPropertyContainer)
Sets aPropertyContainerspecific to the embedding configurator, which is used for property lookups in addition to the globalContextproperties. This allows for overriding or supplementing global properties with local values during evaluation.- Parameters:
aPropertyContainer- the local property container to use for lookups
-
-