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:
BaseModelAction
,BindDataSourceToJNDIAction
,ContextPropertyAction
,ConversionRuleAction
,ImplicitModelAction
,NewRuleAction
,NOPAction
,SequenceNumberGeneratorAction
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.
- Author:
- Craig McClanahan, Christopher Lenz, Ceki Gülcü
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
static String
static String
static String
static String
static String
static String
static String
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
atLine(InterpretationContext intercon)
abstract void
begin(InterpretationContext intercon, String name, Attributes attributes)
Called when the parser encounters an element matching aPattern
.void
body(InterpretationContext intercon, String body)
Called to pass the body (as text) contained within an element.abstract void
end(InterpretationContext intercon, String name)
protected int
getColumnNumber(InterpretationContext intercon)
protected String
getLineColStr(InterpretationContext intercon)
static int
getLineNumber(InterpretationContext intercon)
protected String
nearLine(InterpretationContext intercon)
toString()
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:
- Constant Field Values
-
KEY_ATTRIBUTE
- See Also:
- Constant Field Values
-
VALUE_ATTRIBUTE
- See Also:
- Constant Field Values
-
FILE_ATTRIBUTE
- See Also:
- Constant Field Values
-
CLASS_ATTRIBUTE
- See Also:
- Constant Field Values
-
PATTERN_ATTRIBUTE
- See Also:
- Constant Field Values
-
SCOPE_ATTRIBUTE
- See Also:
- Constant Field Values
-
ACTION_CLASS_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Action
public Action()
-
-
Method Details
-
begin
public abstract void begin(InterpretationContext intercon, String name, Attributes attributes) throws ActionExceptionCalled 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
-
atLine
-
nearLine
-