java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.joran.action.Action
- All Implemented Interfaces:
ContextAware
- Direct Known Subclasses:
BaseModelAction
,ConsolePluginAction
,ContextPropertyAction
,ImplicitModelAction
,NewRuleAction
,NOPAction
,ResourceAction
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
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
atLine
(SaxEventInterpretationContext intercon) abstract void
begin
(SaxEventInterpretationContext intercon, String name, Attributes attributes) Called when the parser encounters an element matching aPattern
.void
body
(SaxEventInterpretationContext intercon, String body) Called to pass the body (as text) contained within an element.abstract void
end
(SaxEventInterpretationContext intercon, String name) protected int
getColumnNumber
(SaxEventInterpretationContext intercon) protected String
getLineColStr
(SaxEventInterpretationContext intercon) static int
getLineNumber
(SaxEventInterpretationContext intercon) protected String
nearLine
(SaxEventInterpretationContext 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:
-
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(SaxEventInterpretationContext intercon, 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:
body
-ic
-- Throws:
ActionException
-
end
public abstract void end(SaxEventInterpretationContext intercon, String name) throws ActionException - Throws:
ActionException
-
toString
-
getColumnNumber
-
getLineNumber
-
getLineColStr
-
atLine
-
nearLine
-