Interface PropertyCondition

All Superinterfaces:
Condition, ContextAware, LifeCycle
All Known Implementing Classes:
ExpressionPropertyCondition, IsPropertyDefinedCondition, IsPropertyNullCondition, PropertyConditionBase, PropertyEqualityCondition

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 Context and 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 Details

    • getLocalPropertyContainer

      Returns the local PropertyContainer used for property lookups specific to the embedding configurator. This is distinct from the global Context property container.
      Returns:
      the local property container, or null if not set
    • setLocalPropertyContainer

      void setLocalPropertyContainer(PropertyContainer aPropertyContainer)
      Sets a PropertyContainer specific to the embedding configurator, which is used for property lookups in addition to the global Context properties. This allows for overriding or supplementing global properties with local values during evaluation.
      Parameters:
      aPropertyContainer - the local property container to use for lookups