Package ch.qos.logback.core.joran.action
Class Action
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.joran.action.Action
- All Implemented Interfaces:
ContextAware
- Direct Known Subclasses:
AbstractEventEvaluatorAction,AddAction,AppenderAction,AppenderRefAction,ComputationAction1,ComputationAction2,ConfigurationAction,ConfigurationAction,ConsolePluginAction,ContextNameAction,ContextPropertyAction,ConversionRuleAction,DefinePropertyAction,HelloWorldAction,IfAction,ImplicitAction,IncludeAction,InsertFromJNDIAction,JMXConfiguratorAction,LevelAction,LiteralAction,LoggerAction,LoggerContextListenerAction,MultiplyAction,NewRuleAction,NOPAction,NOPAction,ParamAction,PropertyAction,ReceiverAction,RootLoggerAction,ShutdownHookAction,SiftAction,SiftAction,StatusListenerAction,ThenOrElseActionBase,TimestampAction
Most of the work for configuring logback is done by Actions.
Action methods are invoked as the XML file is parsed.
This class is largely inspired from the relevant class in the commons-digester project of the Apache Software Foundation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidbegin(InterpretationContext ic, String name, Attributes attributes) Called when the parser encounters an element matching aPattern.voidbody(InterpretationContext ic, String body) Called to pass the body (as text) contained within an element.abstract voidend(InterpretationContext ic, String name) protected intprotected Stringprotected inttoString()Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Field Details
-
NAME_ATTRIBUTE
- See Also:
-
KEY_ATTRIBUTE
- See Also:
-
VALUE_ATTRIBUTE
- See Also:
-
FILE_ATTRIBUTE
- See Also:
-
CLASS_ATTRIBUTE
- See Also:
-
PATTERN_ATTRIBUTE
- See Also:
-
SCOPE_ATTRIBUTE
- See Also:
-
ACTION_CLASS_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
Action
public Action()
-
-
Method Details
-
begin
public abstract void begin(InterpretationContext ic, String name, Attributes attributes) throws ActionException Called when the parser encounters an element matching aPattern.- Throws:
ActionException
-
body
Called to pass the body (as text) contained within an element.- Parameters:
ic-body-- Throws:
ActionException
-
end
- Throws:
ActionException
-
toString
-
getColumnNumber
-
getLineNumber
-
getLineColStr
-