Package ch.qos.logback.core.joran.action
Class PropertyAction
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.joran.action.Action
-
- ch.qos.logback.core.joran.action.PropertyAction
-
- All Implemented Interfaces:
ContextAware
public class PropertyAction extends Action
This class serves as a base for other actions, which similar to the ANTtask which add/set properties of a given object. This action sets new substitution properties in the logging context by name, value pair, or adds all the properties passed in "file" or "resource" attribute.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
INVALID_ATTRIBUTES
(package private) static java.lang.String
RESOURCE_ATTRIBUTE
-
Fields inherited from class ch.qos.logback.core.joran.action.Action
ACTION_CLASS_ATTRIBUTE, CLASS_ATTRIBUTE, FILE_ATTRIBUTE, KEY_ATTRIBUTE, NAME_ATTRIBUTE, PATTERN_ATTRIBUTE, SCOPE_ATTRIBUTE, VALUE_ATTRIBUTE
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description PropertyAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
begin(InterpretationContext ec, java.lang.String localName, org.xml.sax.Attributes attributes)
Set a new property for the execution context by name, value pair, or adds all the properties found in the given file.(package private) boolean
checkFileAttributeSanity(org.xml.sax.Attributes attributes)
(package private) boolean
checkResourceAttributeSanity(org.xml.sax.Attributes attributes)
(package private) boolean
checkValueNameAttributesSanity(org.xml.sax.Attributes attributes)
void
end(InterpretationContext ec, java.lang.String name)
void
finish(InterpretationContext ec)
(package private) void
loadAndSetProperties(InterpretationContext ec, java.io.InputStream istream, ActionUtil.Scope scope)
-
Methods inherited from class ch.qos.logback.core.joran.action.Action
body, getColumnNumber, getLineColStr, getLineNumber, toString
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
-
-
-
Field Detail
-
RESOURCE_ATTRIBUTE
static final java.lang.String RESOURCE_ATTRIBUTE
- See Also:
- Constant Field Values
-
INVALID_ATTRIBUTES
static java.lang.String INVALID_ATTRIBUTES
-
-
Method Detail
-
begin
public void begin(InterpretationContext ec, java.lang.String localName, org.xml.sax.Attributes attributes)
Set a new property for the execution context by name, value pair, or adds all the properties found in the given file.
-
loadAndSetProperties
void loadAndSetProperties(InterpretationContext ec, java.io.InputStream istream, ActionUtil.Scope scope) throws java.io.IOException
- Throws:
java.io.IOException
-
checkFileAttributeSanity
boolean checkFileAttributeSanity(org.xml.sax.Attributes attributes)
-
checkResourceAttributeSanity
boolean checkResourceAttributeSanity(org.xml.sax.Attributes attributes)
-
checkValueNameAttributesSanity
boolean checkValueNameAttributesSanity(org.xml.sax.Attributes attributes)
-
end
public void end(InterpretationContext ec, java.lang.String name)
-
finish
public void finish(InterpretationContext ec)
-
-