You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ce...@apache.org on 2004/12/28 17:28:59 UTC

cvs commit: logging-log4j/src/java/org/apache/log4j/joran/action LevelAction.java ConfigurationAction.java ActionBase.java

ceki        2004/12/28 08:28:59

  Modified:    src/java/org/apache/log4j/joran/action LevelAction.java
                        ConfigurationAction.java
  Removed:     src/java/org/apache/log4j/joran/action ActionBase.java
  Log:
  The ActionBase was not used. Moreover, it should not have existes as Action is already an abstract class.
  
  Revision  Changes    Path
  1.11      +6 -6      logging-log4j/src/java/org/apache/log4j/joran/action/LevelAction.java
  
  Index: LevelAction.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/joran/action/LevelAction.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LevelAction.java	19 Nov 2004 15:20:06 -0000	1.10
  +++ LevelAction.java	28 Dec 2004 16:28:59 -0000	1.11
  @@ -15,7 +15,7 @@
   
   
   public class LevelAction extends Action {
  -  static final Logger logger = Logger.getLogger(LevelAction.class);
  + 
     static final String VALUE_ATTR = "value";
     static final String CLASS_ATTR = "class";
     static final String INHERITED = "INHERITED";
  @@ -29,7 +29,7 @@
       Object o = ec.peekObject();
   
       if (!(o instanceof Logger)) {
  -      logger.warn("Could not find a logger at the top of execution stack.");
  +      getLogger().warn("Could not find a logger at the top of execution stack.");
         inError = true;
         ec.addError(
           new ErrorItem(
  @@ -43,7 +43,7 @@
       String loggerName = l.getName();
   
       String levelStr = attributes.getValue(VALUE_ATTR);
  -    logger.debug(
  +    getLogger().debug(
         "Encapsulating logger name is [" + loggerName + "], levelvalue is  ["
         + levelStr + "].");
   
  @@ -56,7 +56,7 @@
         if ((className == null) || EMPTY_STR.equals(className)) {
           l.setLevel(OptionConverter.toLevel(levelStr, Level.DEBUG));
         } else {
  -        logger.debug("Desired Level sub-class: [" + className + ']');
  +        getLogger().debug("Desired Level sub-class: [" + className + ']');
   
           try {
             Class clazz = Loader.loadClass(className);
  @@ -65,7 +65,7 @@
               (Level) toLevelMethod.invoke(null, new Object[] { levelStr });
             l.setLevel(pri);
           } catch (Exception oops) {
  -          logger.error(
  +          getLogger().error(
               "Could not create level [" + levelStr
               + "]. Reported error follows.", oops);
   
  @@ -74,7 +74,7 @@
         }
       }
   
  -    logger.debug(loggerName + " level set to " + l.getLevel());
  +    getLogger().debug(loggerName + " level set to " + l.getLevel());
     }
   
     public void finish(ExecutionContext ec) {
  
  
  
  1.8       +2 -1      logging-log4j/src/java/org/apache/log4j/joran/action/ConfigurationAction.java
  
  Index: ConfigurationAction.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/joran/action/ConfigurationAction.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ConfigurationAction.java	29 Nov 2004 19:22:20 -0000	1.7
  +++ ConfigurationAction.java	28 Dec 2004 16:28:59 -0000	1.8
  @@ -19,6 +19,7 @@
   import java.util.List;
   
   import org.apache.joran.ExecutionContext;
  +import org.apache.joran.action.Action;
   
   import org.apache.log4j.Logger;
   import org.apache.log4j.config.ConfiguratorBase;
  @@ -26,7 +27,7 @@
   import org.xml.sax.Attributes;
   
   
  -public class ConfigurationAction extends ActionBase {
  +public class ConfigurationAction extends Action {
     static final Logger logger = Logger.getLogger(ConfigurationAction.class);
     static final String INTERNAL_DEBUG_ATTR = "debug";
     boolean attachment = false;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org