ch.qos.logback.core.joran.action
Class Action

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.core.joran.action.Action
All Implemented Interfaces:
ContextAware
Direct Known Subclasses:
AbstractEventEvaluatorAction, AppenderAction, AppenderRefAction, ConfigurationAction, ConsolePluginAction, ContextNameAction, ContextPropertyAction, ConversionRuleAction, DefinePropertyAction, ImplicitAction, IncludeAction, LevelAction, LoggerAction, LoggerContextListenerAction, NewRuleAction, NOPAction, ParamAction, PropertyAction, RootLoggerAction, SiftAction, StatusListenerAction, TimestampAction

public abstract class Action
extends ContextAwareBase

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
static java.lang.String ACTION_CLASS_ATTRIBUTE
           
static java.lang.String CLASS_ATTRIBUTE
           
static java.lang.String FILE_ATTRIBUTE
           
static java.lang.String KEY_ATTRIBUTE
           
static java.lang.String NAME_ATTRIBUTE
           
static java.lang.String PATTERN_ATTRIBUTE
           
static java.lang.String SCOPE_ATTRIBUTE
           
static java.lang.String VALUE_ATTRIBUTE
           
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
Action()
           
 
Method Summary
abstract  void begin(InterpretationContext ic, java.lang.String name, org.xml.sax.Attributes attributes)
          Called when the parser encounters an element matching a Pattern.
 void body(InterpretationContext ic, java.lang.String body)
          Called to pass the body (as text) contained within an element.
abstract  void end(InterpretationContext ic, java.lang.String name)
           
protected  int getColumnNumber(InterpretationContext ic)
           
protected  java.lang.String getLineColStr(InterpretationContext ic)
           
protected  int getLineNumber(InterpretationContext ic)
           
 java.lang.String toString()
           
 
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_ATTRIBUTE

public static final java.lang.String NAME_ATTRIBUTE
See Also:
Constant Field Values

KEY_ATTRIBUTE

public static final java.lang.String KEY_ATTRIBUTE
See Also:
Constant Field Values

VALUE_ATTRIBUTE

public static final java.lang.String VALUE_ATTRIBUTE
See Also:
Constant Field Values

FILE_ATTRIBUTE

public static final java.lang.String FILE_ATTRIBUTE
See Also:
Constant Field Values

CLASS_ATTRIBUTE

public static final java.lang.String CLASS_ATTRIBUTE
See Also:
Constant Field Values

PATTERN_ATTRIBUTE

public static final java.lang.String PATTERN_ATTRIBUTE
See Also:
Constant Field Values

SCOPE_ATTRIBUTE

public static final java.lang.String SCOPE_ATTRIBUTE
See Also:
Constant Field Values

ACTION_CLASS_ATTRIBUTE

public static final java.lang.String ACTION_CLASS_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

Action

public Action()
Method Detail

begin

public abstract void begin(InterpretationContext ic,
                           java.lang.String name,
                           org.xml.sax.Attributes attributes)
                    throws ActionException
Called when the parser encounters an element matching a Pattern.

Throws:
ActionException

body

public void body(InterpretationContext ic,
                 java.lang.String body)
          throws ActionException
Called to pass the body (as text) contained within an element.

Parameters:
ic -
body -
Throws:
ActionException

end

public abstract void end(InterpretationContext ic,
                         java.lang.String name)
                  throws ActionException
Throws:
ActionException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getColumnNumber

protected int getColumnNumber(InterpretationContext ic)

getLineNumber

protected int getLineNumber(InterpretationContext ic)

getLineColStr

protected java.lang.String getLineColStr(InterpretationContext ic)