Class SimpleRuleStore

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.joran.spi.SimpleRuleStore
All Implemented Interfaces:
RuleStore, ContextAware

public class SimpleRuleStore extends ContextAwareBase implements RuleStore
This class implements the RuleStore interface. It is the rule store implementation used by default in Joran.
Author:
Ceki Gülcü
  • Constructor Details

    • SimpleRuleStore

      public SimpleRuleStore(Context context)
  • Method Details

    • addTransparentPathPart

      public void addTransparentPathPart(String pathPart)
      Specified by:
      addTransparentPathPart in interface RuleStore
    • addRule

      public void addRule(ElementSelector elementSelector, Supplier<Action> actionSupplier)
      Add a new rule, i.e. a pattern, action pair to the rule store.

      Note that the added action's LoggerRepository will be set in the process.

      Specified by:
      addRule in interface RuleStore
      Parameters:
      elementSelector -
    • addRule

      public void addRule(ElementSelector elementSelector, String actionClassName)
      Description copied from interface: RuleStore
      Add a new rule, given by a pattern and an action class (String).
      Specified by:
      addRule in interface RuleStore
      Parameters:
      elementSelector -
      actionClassName -
    • matchActions

      public Supplier<Action> matchActions(ElementPath elementPath)
      Description copied from interface: RuleStore
      Return a list of actions matching a pattern.
      Specified by:
      matchActions in interface RuleStore
      Parameters:
      elementPath - the path to match for
      Returns:
      list of matching actions
    • toString

      public String toString()
      Overrides:
      toString in class Object