Package ch.qos.logback.core.joran.spi
Class SimpleRuleStore
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.joran.spi.SimpleRuleStore
- All Implemented Interfaces:
RuleStore
,ContextAware
This class implements the
RuleStore
interface. It is the rule store
implementation used by default in Joran.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static String
(package private) HashMap<ElementSelector,
List<Action>> Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRule
(ElementSelector elementSelector, Action action) Add a new rule, i.e.void
addRule
(ElementSelector elementSelector, String actionClassName) Add a new rule, given by a pattern and a action class (String).fullPathMatch
(ElementPath elementPath) private boolean
isKleeneStar
(String last) private boolean
matchActions
(ElementPath elementPath) Return a list of actions matching a pattern.middleMatch
(ElementPath path) prefixMatch
(ElementPath elementPath) suffixMatch
(ElementPath elementPath) toString()
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Field Details
-
KLEENE_STAR
-
rules
HashMap<ElementSelector,List<Action>> rules
-
-
Constructor Details
-
SimpleRuleStore
-
-
Method Details
-
addRule
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.
-
addRule
Description copied from interface:RuleStore
Add a new rule, given by a pattern and a action class (String). -
matchActions
Description copied from interface:RuleStore
Return a list of actions matching a pattern.- Specified by:
matchActions
in interfaceRuleStore
- Parameters:
elementPath
- the path to match for- Returns:
- list of matching actions
-
fullPathMatch
-
suffixMatch
-
isSuffixPattern
-
prefixMatch
-
isKleeneStar
-
middleMatch
-
toString
-