Top Description Fields Constructors Methods
ch.qos.logback.core.joran.spi

public Class SimpleRuleStore

extends ContextAwareBase
implements RuleStore
Class Inheritance
All Implemented Interfaces
ch.qos.logback.core.joran.spi.RuleStore
Imports
java.util.ArrayList, .HashMap, .List, java.util.function.Supplier, ch.qos.logback.core.Context, ch.qos.logback.core.joran.action.Action, ch.qos.logback.core.spi.ContextAwareBase, ch.qos.logback.core.util.OptionHelper

This class implements the RuleStore interface. It is the rule store implementation used by default in Joran.
Author
Ceki Gülcü

Field Summary

Modifier and TypeField and Description
pack-priv static String
pack-priv HashMap<ElementSelector, Supplier<Action>>
pack-priv List<String>
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
context

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addRule(ElementSelector elementSelector, Supplier<Action> actionSupplier)

Implements ch.qos.logback.core.joran.spi.RuleStore.addRule.

Add a new rule, i.e. a pattern, action pair to the rule store.
public void
addRule(ElementSelector elementSelector, String actionClassName)

Implements ch.qos.logback.core.joran.spi.RuleStore.addRule.

Add a new rule, given by a pattern and an action class (String).
public void
pack-priv Supplier<Action>
private Supplier<Action>
private boolean
private boolean
public Supplier<Action>
matchActions(ElementPath
the path to match for
elementPath
)

Implements ch.qos.logback.core.joran.spi.RuleStore.matchActions.

Return a list of actions matching a pattern.
pack-priv Supplier<Action>
pack-priv Supplier<Action>
prefixMatch(ElementPath elementPath)

pack-priv ElementPath
pack-priv Supplier<Action>
suffixMatch(ElementPath elementPath)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
addErroraddErroraddInfoaddInfoaddStatusaddWarnaddWarngetContextgetDeclaredOrigingetStatusManagersetContext

Field Detail

KLEENE_STARback to summary
pack-priv static String KLEENE_STAR
rulesback to summary
pack-priv HashMap<ElementSelector, Supplier<Action>> rules
transparentPathPartsback to summary
pack-priv List<String> transparentPathParts

Constructor Detail

SimpleRuleStoreback to summary
public SimpleRuleStore(Context context)

Method Detail

addRuleback to summary
public void addRule(ElementSelector elementSelector, Supplier<Action> actionSupplier)

Implements ch.qos.logback.core.joran.spi.RuleStore.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.

addRuleback to summary
public void addRule(ElementSelector elementSelector, String actionClassName)

Implements ch.qos.logback.core.joran.spi.RuleStore.addRule.

Doc from ch.qos.logback.core.joran.spi.RuleStore.addRule.

Add a new rule, given by a pattern and an action class (String).

addTransparentPathPartback to summary
public void addTransparentPathPart(String pathPart)

Implements ch.qos.logback.core.joran.spi.RuleStore.addTransparentPathPart.

fullPathMatchback to summary
pack-priv Supplier<Action> fullPathMatch(ElementPath elementPath)
internalMatchActionback to summary
private Supplier<Action> internalMatchAction(ElementPath elementPath)
isKleeneStarback to summary
private boolean isKleeneStar(String last)
isSuffixPatternback to summary
private boolean isSuffixPattern(ElementSelector p)
matchActionsback to summary
public Supplier<Action> matchActions(ElementPath elementPath)

Implements ch.qos.logback.core.joran.spi.RuleStore.matchActions.

Doc from ch.qos.logback.core.joran.spi.RuleStore.matchActions.

Return a list of actions matching a pattern.

Parameters
elementPath:ElementPath

the path to match for

Returns:Supplier<Action>

list of matching actions

middleMatchback to summary
pack-priv Supplier<Action> middleMatch(ElementPath path)
prefixMatchback to summary
pack-priv Supplier<Action> prefixMatch(ElementPath elementPath)
removeTransparentPathPartsback to summary
pack-priv ElementPath removeTransparentPathParts(ElementPath originalElementPath)
suffixMatchback to summary
pack-priv Supplier<Action> suffixMatch(ElementPath elementPath)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.