Log4j 1.3alpha-8

org.apache.log4j.joran.action
Class Action

java.lang.Object
  |
  +--org.apache.log4j.spi.ComponentBase
        |
        +--org.apache.log4j.joran.action.Action
All Implemented Interfaces:
Component
Direct Known Subclasses:
AppenderAction, AppenderRefAction, ConfigurationAction, ConversionRuleAction, ImplicitAction, JndiSubstitutionPropertyAction, LayoutAction, LevelAction, LoggerAction, NewRuleAction, ParamAction, PluginAction, PropertyAction, RootLoggerAction

public abstract class Action
extends ComponentBase

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 String ACTION_CLASS_ATTRIBUTE
           
static String CLASS_ATTRIBUTE
           
static String FILE_ATTRIBUTE
           
static String NAME_ATTRIBUTE
           
static String PATTERN_ATTRIBUTE
           
static String VALUE_ATTRIBUTE
           
 
Fields inherited from class org.apache.log4j.spi.ComponentBase
repository
 
Constructor Summary
Action()
           
 
Method Summary
abstract  void begin(org.apache.log4j.joran.spi.ExecutionContext ec, String name, Attributes attributes)
          Called when the parser first encounters an element.
abstract  void end(org.apache.log4j.joran.spi.ExecutionContext ec, String name)
           
protected  int getColumnNumber(org.apache.log4j.joran.spi.ExecutionContext ec)
           
protected  int getLineNumber(org.apache.log4j.joran.spi.ExecutionContext ec)
           
 String toString()
           
 
Methods inherited from class org.apache.log4j.spi.ComponentBase
getLogger, getLoggerRepository, getNonFloodingLogger, resetErrorCount, setLoggerRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_ATTRIBUTE

public static final String NAME_ATTRIBUTE

VALUE_ATTRIBUTE

public static final String VALUE_ATTRIBUTE

FILE_ATTRIBUTE

public static final String FILE_ATTRIBUTE

CLASS_ATTRIBUTE

public static final String CLASS_ATTRIBUTE

PATTERN_ATTRIBUTE

public static final String PATTERN_ATTRIBUTE

ACTION_CLASS_ATTRIBUTE

public static final String ACTION_CLASS_ATTRIBUTE
Constructor Detail

Action

public Action()
Method Detail

begin

public abstract void begin(org.apache.log4j.joran.spi.ExecutionContext ec,
                           String name,
                           Attributes attributes)
                    throws org.apache.log4j.joran.spi.ActionException
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(org.apache.log4j.joran.spi.ExecutionContext ec,
                         String name)
                  throws org.apache.log4j.joran.spi.ActionException

toString

public String toString()
Overrides:
toString in class Object

getColumnNumber

protected int getColumnNumber(org.apache.log4j.joran.spi.ExecutionContext ec)

getLineNumber

protected int getLineNumber(org.apache.log4j.joran.spi.ExecutionContext ec)

Log4j 1.3alpha-8

Copyright © 2000-2006 Apache Software Foundation.
Licensed under the Apache License, Version 2.0.