Log4j 1.3alpha-3

org.apache.joran.action
Class Action

java.lang.Object
  |
  +--org.apache.joran.action.Action
Direct Known Subclasses:
ActionBase, AppenderAction, AppenderRefAction, ConversionRuleAction, ImplicitAction, LayoutAction, LevelAction, LoggerAction, NewRuleAction, ParamAction, PluginAction, PropertyAction, RootLoggerAction

public abstract class Action
extends java.lang.Object

Most of the work for configuring log4j is done by Actions. Methods of an Action are invoked while an XML file is parsed through. This class is largely copied 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 NAME_ATTRIBUTE
           
static java.lang.String PATTERN_ATTRIBUTE
           
static java.lang.String VALUE_ATTRIBUTE
           
 
Constructor Summary
Action()
           
 
Method Summary
abstract  void begin(ExecutionContext ec, java.lang.String name, Attributes attributes)
          Called when the parser first encounters an element.
abstract  void end(ExecutionContext ec, java.lang.String name)
           
protected  int getColumnNumber(ExecutionContext ec)
           
protected  int getLineNumber(ExecutionContext ec)
           
protected  Logger getLogger()
          Return an instance specifi logger to be used by the Action itself.
 java.lang.String toString()
           
 
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

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

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(ExecutionContext ec,
                           java.lang.String name,
                           Attributes attributes)
Called when the parser first encounters an element. The return value indicates whether child elements should be processed. If the returned value is 'false', then child elements are ignored.


end

public abstract void end(ExecutionContext ec,
                         java.lang.String name)

toString

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

getColumnNumber

protected int getColumnNumber(ExecutionContext ec)

getLineNumber

protected int getLineNumber(ExecutionContext ec)

getLogger

protected Logger getLogger()
Return an instance specifi logger to be used by the Action itself. This logger is not intended to be used by Mrs. Piggy, our proverbial user, hence the protected keyword.

Returns:
instance specific logger

Log4j 1.3alpha-3

Copyright 2000-2003 Apache Software Foundation.