You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-cvs@jakarta.apache.org by ce...@apache.org on 2001/09/02 22:05:41 UTC

cvs commit: jakarta-log4j/src/java/org/apache/log4j/xml/test XTest.java

ceki        01/09/02 13:05:40

  Modified:    src/java/org/apache/log4j AppenderSkeleton.java
                        BasicConfigurator.java Category.java
                        HTMLLayout.java Hierarchy.java Makefile NDC.java
                        Priority.java PropertyConfigurator.java
                        SimpleLayout.java StressCategory.java
                        TTCCLayout.java
               src/java/org/apache/log4j/config PropertyPrinter.java
                        PropertySetter.java
               src/java/org/apache/log4j/examples MyCategory.java
                        MyCategoryTest.java
               src/java/org/apache/log4j/helpers OptionConverter.java
                        PatternParser.java SyslogQuietWriter.java
               src/java/org/apache/log4j/net SMTPAppender.java
                        SocketNode.java SyslogAppender.java
               src/java/org/apache/log4j/nt NTEventLogAppender.java
               src/java/org/apache/log4j/performance NotLogging.java
               src/java/org/apache/log4j/spi LoggingEvent.java Makefile
                        RootCategory.java
               src/java/org/apache/log4j/test CustomCategoryTest.java
                        Min.java StressNDC.java UnitTestCategory.java
                        UnitTestOptionConverter.java
               src/java/org/apache/log4j/test/witness getOptions.1
               src/java/org/apache/log4j/test/xml ext1.xml
               src/java/org/apache/log4j/varia Makefile
                        PriorityMatchFilter.java PriorityRangeFilter.java
               src/java/org/apache/log4j/xml DOMConfigurator.java
                        XMLLayout.java
               src/java/org/apache/log4j/xml/examples Makefile
                        XCategory.java XTest.java
               src/java/org/apache/log4j/xml/test XTest.java
  Added:       src/java/org/apache/log4j LogManager.java
  Log:
  The Priority class has been renamed to Level. Priority now extends Level
  for backward compatibility. Many classes have been modified to reflect the
  change.
  
  Revision  Changes    Path
  1.16      +12 -12    jakarta-log4j/src/java/org/apache/log4j/AppenderSkeleton.java
  
  Index: AppenderSkeleton.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/AppenderSkeleton.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- AppenderSkeleton.java	2001/07/25 19:43:43	1.15
  +++ AppenderSkeleton.java	2001/09/02 20:05:38	1.16
  @@ -34,8 +34,8 @@
     protected String name;
   
     /**
  -     There is no priority threshold filtering by default.  */
  -  protected Priority threshold;
  +     There is no level threshold filtering by default.  */
  +  protected Level threshold;
   
     /** 
         It is assumed and enforced that errorHandler is never null.
  @@ -168,25 +168,25 @@
     }
   
     /**
  -     Returns this appenders threshold priority. See the {@link
  +     Returns this appenders threshold level. See the {@link
        #setThreshold} method for the meaning of this option.
        
        @since 1.1 */
     public
  -  Priority getThreshold() {
  +  Level getThreshold() {
       return threshold;
     }
   
   
     /**
  -     Check whether the message priority is below the appender's
  +     Check whether the message level is below the appender's
        threshold. If there is no threshold set, then the return value is
        always <code>true</code>.
   
     */
     public
  -  boolean isAsSevereAsThreshold(Priority priority) {
  -    return ((threshold == null) || priority.isGreaterOrEqual(threshold));
  +  boolean isAsSevereAsThreshold(Level level) {
  +    return ((threshold == null) || level.isGreaterOrEqual(threshold));
     }
   
   
  @@ -203,7 +203,7 @@
         LogLog.error("Attempted to append to closed appender named ["+name+"].");
       }
   
  -    if(!isAsSevereAsThreshold(event.priority)) {
  +    if(!isAsSevereAsThreshold(event.level)) {
         return;
       }
   
  @@ -259,16 +259,16 @@
   
   
     /**
  -     Set the threshold priority. All log events with lower priority
  -     than the threshold priority are ignored by the appender.
  +     Set the threshold level. All log events with lower level
  +     than the threshold level are ignored by the appender.
        
        <p>In configuration files this option is specified by setting the
  -     value of the <b>Threshold</b> option to a priority
  +     value of the <b>Threshold</b> option to a level
        string, such as "DEBUG", "INFO" and so on.
        
        @since 0.8.3 */
     public
  -  void setThreshold(Priority threshold) {
  +  void setThreshold(Level threshold) {
       this.threshold = threshold;
     }  
   }
  
  
  
  1.18      +10 -10    jakarta-log4j/src/java/org/apache/log4j/BasicConfigurator.java
  
  Index: BasicConfigurator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/BasicConfigurator.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- BasicConfigurator.java	2001/08/06 20:21:01	1.17
  +++ BasicConfigurator.java	2001/09/02 20:05:39	1.18
  @@ -55,7 +55,7 @@
   
        <p>Setting the system property <b>log4j.disable</b> to DEBUG,
        INFO, WARN, ERROR or FATAL is equivalent to calling the {@link
  -     Hierarchy#disable} method with the corresponding priority.
  +     Hierarchy#disable} method with the corresponding level.
   
        <p>If both <code>log4j.disableOverride</code> and a
        <code>log4j.disable</code> options are present, then
  @@ -67,7 +67,7 @@
   
   
     /**
  -     Special priority value signifying inherited behaviour. The
  +     Special level value signifying inherited behaviour. The
        current value of this string constant is <b>inherited</b>.
   
     */
  @@ -124,17 +124,17 @@
        @deprecated Use <code>Category.getDefaultHierarchy().disable()</code> instead.  */
     public
     static
  -  void disable(String priorityStr) {
  -    Category.getDefaultHierarchy().disable(priorityStr);
  +  void disable(String levelStr) {
  +    Category.getDefaultHierarchy().disable(levelStr);
     }
   
     /**
  -     See {@link Hierarchy#disable(Priority)}.
  +     See {@link Hierarchy#disable(Level)}.
   
        @deprecated Use <code>Category.getDefaultHierarchy().disable(p)</code> instead.  */
     public
     static
  -  void disable(Priority p) {
  +  void disable(Level p) {
     
     }
     
  @@ -146,7 +146,7 @@
     public
     static
     void disableAll() {
  -      Category.getDefaultHierarchy().disable(Priority.FATAL);
  +      Category.getDefaultHierarchy().disable(Level.FATAL);
     }
   
    /**
  @@ -156,7 +156,7 @@
     public
     static
     void disableDebug() {
  -    Category.getDefaultHierarchy().disable(Priority.DEBUG);
  +    Category.getDefaultHierarchy().disable(Level.DEBUG);
     }  
   
    /**
  @@ -166,7 +166,7 @@
     public
     static
     void disableInfo() {
  -    Category.getDefaultHierarchy().disable(Priority.INFO);
  +    Category.getDefaultHierarchy().disable(Level.INFO);
     } 
     
   
  @@ -177,7 +177,7 @@
     public
     static
     void enableAll() {
  -    Category.getDefaultHierarchy().disable(Priority.INFO);
  +    Category.getDefaultHierarchy().disable(Level.INFO);
     }
   
     /**
  
  
  
  1.42      +126 -104  jakarta-log4j/src/java/org/apache/log4j/Category.java
  
  Index: Category.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Category.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Category.java	2001/08/09 20:19:06	1.41
  +++ Category.java	2001/09/02 20:05:39	1.42
  @@ -21,7 +21,6 @@
   
   package org.apache.log4j;
   
  -import org.apache.log4j.Priority;
   import org.apache.log4j.spi.RootCategory;
   import org.apache.log4j.spi.AppenderAttachable;
   import org.apache.log4j.spi.CategoryFactory;
  @@ -61,7 +60,7 @@
     static 
     public 
     final Hierarchy defaultHierarchy = new Hierarchy(new 
  -						   RootCategory(Priority.DEBUG));
  +						   RootCategory(Level.DEBUG));
   
   
     /**
  @@ -184,10 +183,10 @@
     protected String   name;  
   
     /**
  -     The assigned priority of this category.  The
  -     <code>priority</code> variable need not be assined a value in
  +     The assigned level of this category.  The
  +     <code>level</code> variable need not be assined a value in
        which case it is inherited form the hierarchy.  */
  -  volatile protected Priority priority;
  +  volatile protected Level level;
   
     /**
        The parent of this category. All categories have at least one
  @@ -320,11 +319,11 @@
     }
   
     /** 
  -    Log a message object with the {@link Priority#DEBUG DEBUG} priority.
  +    Log a message object with the {@link Level#DEBUG DEBUG} level.
   
       <p>This method first checks if this category is <code>DEBUG</code>
  -    enabled by comparing the priority of this category with the {@link
  -    Priority#DEBUG DEBUG} priority. If this category is
  +    enabled by comparing the level of this category with the {@link
  +    Level#DEBUG DEBUG} level. If this category is
       <code>DEBUG</code> enabled, then it converts the message object
       (passed as parameter) to a string by invoking the appropriate
       {@link ObjectRenderer}. It then proceeds to call all the
  @@ -339,16 +338,16 @@
       @param message the message object to log. */
     public
     void debug(Object message) {
  -    if(hierarchy.enableInt >  Priority.DEBUG_INT) 
  +    if(hierarchy.enableInt >  Level.DEBUG_INT) 
         return;    
  -    if(Priority.DEBUG.isGreaterOrEqual(this.getChainedPriority())) {
  -      forcedLog(FQCN, Priority.DEBUG, message, null);
  +    if(Level.DEBUG.isGreaterOrEqual(this.getChainedLevel())) {
  +      forcedLog(FQCN, Level.DEBUG, message, null);
       }
     }
     
   
     /**  
  -   Log a message object with the <code>DEBUG</code> priority including
  +   Log a message object with the <code>DEBUG</code> level including
      the stack trace of the {@link Throwable} <code>t</code> passed as
      parameter.
      
  @@ -358,27 +357,27 @@
      @param t the exception to log, including its stack trace.  */  
     public
     void debug(Object message, Throwable t) {
  -    if(hierarchy.enableInt >  Priority.DEBUG_INT) 
  +    if(hierarchy.enableInt >  Level.DEBUG_INT) 
         return;
  -    if(Priority.DEBUG.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, Priority.DEBUG, message, t);    
  +    if(Level.DEBUG.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.DEBUG, message, t);    
     }
   
     //public
     //void dump() {
     //  System.out.println("Category " + name + " dump -----");
     //  for(Category c = this; c != null; c=c.parent)
  -  //	System.out.println("("+c.name+", "+c.priority+") ->");
  +  //	System.out.println("("+c.name+", "+c.level+") ->");
     //  System.out.println("---------------------------");
     //
     //}
     
     /** 
  -    Log a message object with the {@link Priority#ERROR ERROR} priority.
  +    Log a message object with the {@link Level#ERROR ERROR} Level.
   
       <p>This method first checks if this category is <code>ERROR</code>
  -    enabled by comparing the priority of this category with {@link
  -    Priority#ERROR ERROR} priority. If this category is
  +    enabled by comparing the level of this category with {@link
  +    Level#ERROR ERROR} Level. If this category is
       <code>ERROR</code> enabled, then it converts the message object
       passed as parameter to a string by invoking the appropriate {@link
       ObjectRenderer}. It proceeds to call all the registered appenders
  @@ -393,14 +392,14 @@
       @param message the message object to log */
     public
     void error(Object message) {
  -    if(hierarchy.enableInt >  Priority.ERROR_INT) 
  +    if(hierarchy.enableInt >  Level.ERROR_INT) 
         return;
  -    if(Priority.ERROR.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, Priority.ERROR, message, null);
  +    if(Level.ERROR.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.ERROR, message, null);
     }
   
     /** 
  -   Log a message object with the <code>ERROR</code> priority including
  +   Log a message object with the <code>ERROR</code> level including
      the stack trace of the {@link Throwable} <code>t</code> passed as
      parameter.
      
  @@ -410,10 +409,10 @@
      @param t the exception to log, including its stack trace.  */  
     public
     void error(Object message, Throwable t) {
  -    if(hierarchy.enableInt >  Priority.ERROR_INT) 
  +    if(hierarchy.enableInt >  Level.ERROR_INT) 
         return;
  -    if(Priority.ERROR.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, Priority.ERROR, message, t);
  +    if(Level.ERROR.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.ERROR, message, t);
       
     }
   
  @@ -432,11 +431,11 @@
     }
   
     /** 
  -    Log a message object with the {@link Priority#FATAL FATAL} priority.
  +    Log a message object with the {@link Level#FATAL FATAL} Level.
   
       <p>This method first checks if this category is <code>FATAL</code>
  -    enabled by comparing the priority of this category with {@link
  -    Priority#FATAL FATAL} priority. If the category is <code>FATAL</code>
  +    enabled by comparing the level of this category with {@link
  +    Level#FATAL FATAL} Level. If the category is <code>FATAL</code>
       enabled, then it converts the message object passed as parameter
       to a string by invoking the appropriate {@link ObjectRenderer}. It
       proceeds to call all the registered appenders in this category and
  @@ -451,14 +450,14 @@
       @param message the message object to log */
     public
     void fatal(Object message) {
  -    if(hierarchy.enableInt >  Priority.FATAL_INT) 
  +    if(hierarchy.enableInt >  Level.FATAL_INT) 
         return;    
  -    if(Priority.FATAL.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, Priority.FATAL, message, null);
  +    if(Level.FATAL.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.FATAL, message, null);
     }
     
     /** 
  -   Log a message object with the <code>FATAL</code> priority including
  +   Log a message object with the <code>FATAL</code> level including
      the stack trace of the {@link Throwable} <code>t</code> passed as
      parameter.
      
  @@ -468,10 +467,10 @@
      @param t the exception to log, including its stack trace.  */
     public
     void fatal(Object message, Throwable t) {
  -    if(hierarchy.enableInt >  Priority.FATAL_INT) 
  +    if(hierarchy.enableInt >  Level.FATAL_INT) 
         return;   
  -    if(Priority.FATAL.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, Priority.FATAL, message, t);
  +    if(Level.FATAL.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.FATAL, message, t);
     }
   
   
  @@ -479,8 +478,8 @@
        This method creates a new logging event and logs the event
        without further checks.  */
     protected
  -  void forcedLog(String fqcn, Priority priority, Object message, Throwable t) {
  -    callAppenders(new LoggingEvent(fqcn, this, priority, message, t));
  +  void forcedLog(String fqcn, Level level, Object message, Throwable t) {
  +    callAppenders(new LoggingEvent(fqcn, this, level, message, t));
     }
   
   
  @@ -523,17 +522,17 @@
     
     /**
        Starting from this category, search the category hierarchy for a
  -     non-null priority and return it. Otherwise, return the priority of the
  +     non-null level and return it. Otherwise, return the level of the
        root category.
        
        <p>The Category class is designed so that this method executes as
        quickly as possible.
      */
     public 
  -  Priority getChainedPriority() {
  +  Level getChainedLevel() {
       for(Category c = this; c != null; c=c.parent) {
  -      if(c.priority != null) 
  -	return c.priority;
  +      if(c.level != null) 
  +	return c.level;
       }
       return null; // If reached will cause an NullPointerException.
     }
  @@ -581,7 +580,7 @@
        existing instance will be reutrned. Otherwise, a new instance is
        created. 
   
  -     By default, categories do not have a set priority but inherit
  +     By default, categories do not have a set level but inherit
        it from the hierarchy. This is one of the central features of
        log4j.
   
  @@ -653,17 +652,27 @@
   
       
     /**
  -     Returns the assigned {@link Priority}, if any, for this Category.  
  +     Returns the assigned {@link Level}, if any, for this Category.  
        
  -     @return Priority - the assigned Priority, can be <code>null</code>.
  +     @return Level - the assigned Level, can be <code>null</code>.
     */
     final
     public
  -  Priority getPriority() {
  -    return this.priority;
  +  Level getLevel() {
  +    return this.level;
     }
   
     /**
  +     @deprecated Please use {@link #getLevel} instead.
  +  */
  +  final
  +  public
  +  Level getPriority() {
  +    return this.level;
  +  }
  +
  +
  +  /**
        Return the root of the default category hierrachy.
   
        <p>The root category is always instantiated and available. It's
  @@ -734,11 +743,11 @@
     }
     
     /** 
  -    Log a message object with the {@link Priority#INFO INFO} priority.
  +    Log a message object with the {@link Level#INFO INFO} Level.
   
       <p>This method first checks if this category is <code>INFO</code>
  -    enabled by comparing the priority of this category with {@link
  -    Priority#INFO INFO} priority. If the category is <code>INFO</code>
  +    enabled by comparing the level of this category with {@link
  +    Level#INFO INFO} Level. If the category is <code>INFO</code>
       enabled, then it converts the message object passed as parameter
       to a string by invoking the appropriate {@link ObjectRenderer}. It
       proceeds to call all the registered appenders in this category and
  @@ -753,14 +762,14 @@
       @param message the message object to log */
     public
     void info(Object message) {
  -    if(hierarchy.enableInt >  Priority.INFO_INT) 
  +    if(hierarchy.enableInt >  Level.INFO_INT) 
         return;    
  -    if(Priority.INFO.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, Priority.INFO, message, null);
  +    if(Level.INFO.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.INFO, message, null);
     }
     
     /** 
  -   Log a message object with the <code>INFO</code> priority including
  +   Log a message object with the <code>INFO</code> level including
      the stack trace of the {@link Throwable} <code>t</code> passed as
      parameter.
      
  @@ -770,15 +779,15 @@
      @param t the exception to log, including its stack trace.  */
     public
     void info(Object message, Throwable t) {
  -    if(hierarchy.enableInt >  Priority.INFO_INT) 
  +    if(hierarchy.enableInt >  Level.INFO_INT) 
         return;   
  -    if(Priority.INFO.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, Priority.INFO, message, t);
  +    if(Level.INFO.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.INFO, message, t);
     }
   
     /**
       *  Check whether this category is enabled for the <code>DEBUG</code>
  -    *  priority.
  +    *  Level.
       *  
       *  <p> This function is intended to lessen the computational cost of
       *  disabled log debug statements.
  @@ -812,38 +821,38 @@
       *   */
     public
     boolean isDebugEnabled() {
  -    if(hierarchy.enableInt >  Priority.DEBUG_INT)
  +    if(hierarchy.enableInt >  Level.DEBUG_INT)
         return false;   
  -    return Priority.DEBUG.isGreaterOrEqual(this.getChainedPriority());
  +    return Level.DEBUG.isGreaterOrEqual(this.getChainedLevel());
     }
     
     /**
        Check whether this category is enabled for a given {@link
  -     Priority} passed as parameter.
  +     Level} passed as parameter.
   
        See also {@link #isDebugEnabled}.
          
  -     @return boolean True if this category is enabled for <code>priority</code>.
  +     @return boolean True if this category is enabled for <code>level</code>.
     */
     public
  -  boolean isEnabledFor(Priority priority) {
  -    if(hierarchy.enableInt >  priority.level) 
  +  boolean isEnabledFor(Level level) {
  +    if(hierarchy.enableInt >  level.level) 
         return false;
  -    return priority.isGreaterOrEqual(this.getChainedPriority());
  +    return level.isGreaterOrEqual(this.getChainedLevel());
     }
   
     /**
  -    Check whether this category is enabled for the info priority.
  +    Check whether this category is enabled for the info Level.
       See also {@link #isDebugEnabled}.
   
       @return boolean - <code>true</code> if this category is enabled
  -    for priority info, <code>false</code> otherwise.
  +    for level info, <code>false</code> otherwise.
     */
     public
     boolean isInfoEnabled() {
  -    if(hierarchy.enableInt > Priority.INFO_INT)
  +    if(hierarchy.enableInt > Level.INFO_INT)
         return false;   
  -    return Priority.INFO.isGreaterOrEqual(this.getChainedPriority());
  +    return Level.INFO.isGreaterOrEqual(this.getChainedLevel());
     }
   
   
  @@ -856,18 +865,18 @@
   
        @since 0.8.4 */
     public
  -  void l7dlog(Priority priority, String key, Throwable t) {
  -    if(hierarchy.enableInt > priority.level) {
  +  void l7dlog(Level level, String key, Throwable t) {
  +    if(hierarchy.enableInt > level.level) {
         return;
       }
  -    if(priority.isGreaterOrEqual(this.getChainedPriority())) {
  +    if(level.isGreaterOrEqual(this.getChainedLevel())) {
         String msg = getResourceBundleString(key);
         // if message corresponding to 'key' could not be found in the
         // resource bundle, then default to 'key'.
         if(msg == null) {
   	msg = key;
         }
  -      forcedLog(FQCN, priority, msg, t);
  +      forcedLog(FQCN, level, msg, t);
       }
     }
     /**
  @@ -880,18 +889,18 @@
        @since 0.8.4
     */
     public
  -  void l7dlog(Priority priority, String key,  Object[] params, Throwable t) {
  -    if(hierarchy.enableInt > priority.level) {
  +  void l7dlog(Level level, String key,  Object[] params, Throwable t) {
  +    if(hierarchy.enableInt > level.level) {
         return;
       }    
  -    if(priority.isGreaterOrEqual(this.getChainedPriority())) {
  +    if(level.isGreaterOrEqual(this.getChainedLevel())) {
         String pattern = getResourceBundleString(key);
         String msg;
         if(pattern == null) 
   	msg = key;
         else 
   	msg = java.text.MessageFormat.format(pattern, params);
  -      forcedLog(FQCN, priority, msg, t);
  +      forcedLog(FQCN, level, msg, t);
       }
     }
     
  @@ -899,24 +908,24 @@
        This generic form is intended to be used by wrappers.
      */
     public
  -  void log(Priority priority, Object message, Throwable t) {
  -    if(hierarchy.enableInt > priority.level) {
  +  void log(Level level, Object message, Throwable t) {
  +    if(hierarchy.enableInt > level.level) {
         return;
       }
  -    if(priority.isGreaterOrEqual(this.getChainedPriority())) 
  -      forcedLog(FQCN, priority, message, t);
  +    if(level.isGreaterOrEqual(this.getChainedLevel())) 
  +      forcedLog(FQCN, level, message, t);
     }
     
    /**
       This generic form is intended to be used by wrappers. 
    */
     public
  -  void log(Priority priority, Object message) {
  -    if(hierarchy.enableInt > priority.level) {
  +  void log(Level level, Object message) {
  +    if(hierarchy.enableInt > level.level) {
         return;
       }
  -    if(priority.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, priority, message, null);
  +    if(level.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, level, message, null);
     }
   
     /**
  @@ -925,16 +934,16 @@
        invoked by <b>wrapper</b> classes.
             
        @param callerFQCN The wrapper class' fully qualified class name.
  -     @param priority The priority of the logging request.
  +     @param level The level of the logging request.
        @param message The message of the logging request.
        @param t The throwable of the logging request, may be null.  */
     public
  -  void log(String callerFQCN, Priority priority, Object message, Throwable t) {
  -    if(hierarchy.enableInt > priority.level) {
  +  void log(String callerFQCN, Level level, Object message, Throwable t) {
  +    if(hierarchy.enableInt > level.level) {
         return;
       }
  -    if(priority.isGreaterOrEqual(this.getChainedPriority())) {
  -      forcedLog(callerFQCN, priority, message, t);
  +    if(level.isGreaterOrEqual(this.getChainedLevel())) {
  +      forcedLog(callerFQCN, level, message, t);
       }
     }
   
  @@ -995,22 +1004,35 @@
     void setHierarchy(Hierarchy hierarchy) {
       this.hierarchy = hierarchy;
     }
  +
  +  /**
  +     Set the level of this Category.
  +
  +     <p>Null values are admitted.
  +  */
  +  public
  +  void setLevel(Level level) {
  +    this.level = level;
  +  }
  +
     
     /**
  -     Set the priority of this Category.
  +     Set the level of this Category.
   
        <p>Null values are admitted.
  +
  +     @deprecated Please use {@link #setLevel} instead.
     */
     public
     void setPriority(Priority priority) {
  -    this.priority = priority;
  +    setLevel(priority);
     }
   
   
     /**
        Set the resource bundle to be used with localized logging
  -     methods {@link #l7dlog(Priority,String,Throwable)} and {@link
  -     #l7dlog(Priority,String,Object[],Throwable)}.
  +     methods {@link #l7dlog(Level,String,Throwable)} and {@link
  +     #l7dlog(Level,String,Object[],Throwable)}.
   
        @since 0.8.4
      */
  @@ -1044,11 +1066,11 @@
   
     
     /** 
  -    Log a message object with the {@link Priority#WARN WARN} priority.
  +    Log a message object with the {@link Level#WARN WARN} Level.
   
       <p>This method first checks if this category is <code>WARN</code>
  -    enabled by comparing the priority of this category with {@link
  -    Priority#WARN WARN} priority. If the category is <code>WARN</code>
  +    enabled by comparing the level of this category with {@link
  +    Level#WARN WARN} Level. If the category is <code>WARN</code>
       enabled, then it converts the message object passed as parameter
       to a string by invoking the appropriate {@link ObjectRenderer}. It
       proceeds to call all the registered appenders in this category and
  @@ -1063,15 +1085,15 @@
       @param message the message object to log.  */
     public
     void warn(Object message) {
  -    if(hierarchy.enableInt >  Priority.WARN_INT) 
  +    if(hierarchy.enableInt >  Level.WARN_INT) 
         return;   
   
  -    if(Priority.WARN.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, Priority.WARN, message, null);    
  +    if(Level.WARN.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.WARN, message, null);    
     }
     
     /** 
  -   Log a message with the <code>WARN</code> priority including the
  +   Log a message with the <code>WARN</code> level including the
      stack trace of the {@link Throwable} <code>t</code> passed as
      parameter.
      
  @@ -1081,9 +1103,9 @@
      @param t the exception to log, including its stack trace.  */
     public
     void warn(Object message, Throwable t) {
  -    if(hierarchy.enableInt >  Priority.WARN_INT) 
  +    if(hierarchy.enableInt >  Level.WARN_INT) 
         return;   
  -    if(Priority.WARN.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, Priority.WARN, message, t);
  +    if(Level.WARN.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.WARN, message, t);
     }
   }
  
  
  
  1.23      +7 -7      jakarta-log4j/src/java/org/apache/log4j/HTMLLayout.java
  
  Index: HTMLLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/HTMLLayout.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- HTMLLayout.java	2001/07/25 19:43:43	1.22
  +++ HTMLLayout.java	2001/09/02 20:05:39	1.23
  @@ -132,18 +132,18 @@
       sbuf.append(escapeHTMLTags(event.getThreadName()));
       sbuf.append("</td>" + Layout.LINE_SEP);
   
  -    sbuf.append("<td title=\"Priority\">");
  -    if (event.priority.equals(Priority.DEBUG)) {
  +    sbuf.append("<td title=\"Level\">");
  +    if (event.level.equals(Level.DEBUG)) {
         sbuf.append("<font color=\"#339933\">");
  -      sbuf.append(event.priority);      
  +      sbuf.append(event.level);      
         sbuf.append("</font>");
       }
  -    else if(event.priority.isGreaterOrEqual(Priority.WARN)) {
  +    else if(event.level.isGreaterOrEqual(Level.WARN)) {
         sbuf.append("<font color=\"#993300\"><strong>");
  -      sbuf.append(event.priority);      
  +      sbuf.append(event.level);      
         sbuf.append("</strong></font>");
       } else {
  -      sbuf.append(event.priority);      
  +      sbuf.append(event.level);      
       }
       sbuf.append("</td>" + Layout.LINE_SEP);
   
  @@ -221,7 +221,7 @@
       sbuf.append("<tr>" + Layout.LINE_SEP);
       sbuf.append("<th>Time</th>" + Layout.LINE_SEP);
       sbuf.append("<th>Thread</th>" + Layout.LINE_SEP);
  -    sbuf.append("<th>Priority</th>" + Layout.LINE_SEP);
  +    sbuf.append("<th>Level</th>" + Layout.LINE_SEP);
       sbuf.append("<th>Category</th>" + Layout.LINE_SEP);
       if(locationInfo) {
         sbuf.append("<th>File:Line</th>" + Layout.LINE_SEP);
  
  
  
  1.26      +40 -40    jakarta-log4j/src/java/org/apache/log4j/Hierarchy.java
  
  Index: Hierarchy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Hierarchy.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Hierarchy.java	2001/08/21 16:06:05	1.25
  +++ Hierarchy.java	2001/09/02 20:05:39	1.26
  @@ -63,7 +63,7 @@
     RendererMap rendererMap;
     
     int enableInt;
  -  Priority enable;
  +  Level enable;
   
     boolean emittedNoAppenderWarning = false;
     boolean emittedNoResourceBundleWarning = false;  
  @@ -79,8 +79,8 @@
       ht = new Hashtable();
       listeners = new Vector(1);
       this.root = root;
  -    // Enable all priority levels by default.
  -    enable(Priority.ALL);
  +    // Enable all level levels by default.
  +    enable(Level.ALL);
       this.root.setHierarchy(this);
       rendererMap = new RendererMap();
       defaultFactory = new DefaultCategoryFactory();
  @@ -137,28 +137,28 @@
   
   
     /**
  -     Similar to {@link #disable(Priority)} except that the priority
  +     Similar to {@link #disable(Level)} except that the level
        argument is given as a String.  
   
  -     @deprecated Replaced with the {@link #enable(Priority)} familiy
  +     @deprecated Replaced with the {@link #enable(Level)} familiy
        of methods
     */
     public
  -  void disable(String priorityStr) {
  -    Priority p = Priority.toPriority(priorityStr, null);
  +  void disable(String levelStr) {
  +    Level p = Level.toLevel(levelStr, null);
       if(p != null) {
         disable(p);
       } else {
  -      LogLog.warn("Could not convert ["+priorityStr+"] to Priority.");
  +      LogLog.warn("Could not convert ["+levelStr+"] to Level.");
       }
     }
   
   
     /**
  -     Disable all logging requests of priority <em>equal to or
  -     below</em> the priority parameter <code>p</code>, for
  +     Disable all logging requests of level <em>equal to or
  +     below</em> the level parameter <code>p</code>, for
        <em>all</em> categories in this hierarchy. Logging requests of
  -     higher priority then <code>p</code> remain unaffected.
  +     higher level then <code>p</code> remain unaffected.
   
        <p>The "disable" family of methods are there for speed. They
        allow printing methods such as debug, info, etc. to return
  @@ -175,63 +175,63 @@
   
        @since 0.8.5 */
     public
  -  void disable(Priority p) {
  +  void disable(Level p) {
       if(p != null) {    
         switch(p.level) {
  -      case Priority.ALL_INT: enable(Priority.ALL); break;      
  -      case Priority.DEBUG_INT: enable(Priority.INFO); break;      
  -      case Priority.INFO_INT: enable(Priority.WARN); break;
  -      case Priority.WARN_INT: enable(Priority.ERROR); break;      
  -      case Priority.ERROR_INT: enable(Priority.FATAL); break;      
  -      case Priority.FATAL_INT: enable(Priority.OFF); break;      
  -      case Priority.OFF_INT: enable(Priority.OFF); break;      
  +      case Level.ALL_INT: enable(Level.ALL); break;      
  +      case Level.DEBUG_INT: enable(Level.INFO); break;      
  +      case Level.INFO_INT: enable(Level.WARN); break;
  +      case Level.WARN_INT: enable(Level.ERROR); break;      
  +      case Level.ERROR_INT: enable(Level.FATAL); break;      
  +      case Level.FATAL_INT: enable(Level.OFF); break;      
  +      case Level.OFF_INT: enable(Level.OFF); break;      
         default: 
         }
       }
     }
     
     /**
  -     Disable all logging requests regardless of category and priority.
  +     Disable all logging requests regardless of category and level.
        This method is equivalent to calling {@link #disable} with the
  -     argument {@link Priority#FATAL}, the highest possible priority.
  +     argument {@link Level#FATAL}, the highest possible level.
   
        @deprecated Please use the {@link #enable} familiy of methods instead.
   
        @since 0.8.5 */
     public
     void disableAll() {
  -    disable(Priority.FATAL);
  +    disable(Level.FATAL);
     }
   
   
     /**
  -     Disable all logging requests of priority DEBUG regardless of
  +     Disable all logging requests of level DEBUG regardless of
        category.  Invoking this method is equivalent to calling {@link
  -     #disable} with the argument {@link Priority#DEBUG}.
  +     #disable} with the argument {@link Level#DEBUG}.
   
        @deprecated Please use the {@link #enable} familiy of methods instead.
   
        @since 0.8.5 */
     public
     void disableDebug() {
  -    disable(Priority.DEBUG);
  +    disable(Level.DEBUG);
     }
   
   
     /**
  -     Disable all logging requests of priority INFO and below
  +     Disable all logging requests of level INFO and below
        regardless of category. Note that DEBUG messages are also
        disabled.  
   
        <p>Invoking this method is equivalent to calling {@link
  -     #disable(Priority)} with the argument {@link Priority#INFO}.
  +     #disable(Level)} with the argument {@link Level#INFO}.
   
        @deprecated Please use the {@link #enable} familiy of methods instead.
   
        @since 0.8.5 */
     public
     void disableInfo() {
  -    disable(Priority.INFO);
  +    disable(Level.INFO);
     }  
   
     /**
  @@ -244,17 +244,17 @@
        @since 0.8.5 */
     public
     void enableAll() {
  -    enable(Priority.ALL);
  +    enable(Level.ALL);
     }
   
     /**
  -     Enable logging for events with priority p or higher.
  +     Enable logging for events with level p or higher.
   
  -	  @param p the minimum priority for which events are sent to
  +	  @param p the minimum level for which events are sent to
   	         their appenders.
   	  @since 1.1.3 */
     public 
  -  void enable(Priority p) {
  +  void enable(Level p) {
       if(p != null) {
         enableInt = p.level;
         enable = p;
  @@ -287,13 +287,13 @@
     }
   
     /**
  -     Returns a {@link Priority} representation of the
  +     Returns a {@link Level} representation of the
        <code>enable</code> state.  
   
        @since 1.2
     */
     public
  -  Priority getEnable() {
  +  Level getEnable() {
       return enable;
     }
   
  @@ -331,7 +331,7 @@
       //System.out.println("getInstance("+name+") called.");
       CategoryKey key = new CategoryKey(name);    
       // Synchronize to prevent write conflicts. Read conflicts (in
  -    // getChainedPriority method) are possible only if variable
  +    // getChainedLevel method) are possible only if variable
       // assignments are non-atomic.
       Category category;
       
  @@ -424,9 +424,9 @@
     /**
        Reset all values contained in this hierarchy instance to their
        default.  This removes all appenders from all categories, sets
  -     the priority of all non-root categories to <code>null</code>,
  -     sets their additivity flag to <code>true</code> and sets the priority
  -     of the root category to {@link Priority#DEBUG DEBUG}.  Moreover,
  +     the level of all non-root categories to <code>null</code>,
  +     sets their additivity flag to <code>true</code> and sets the level
  +     of the root category to {@link Level#DEBUG DEBUG}.  Moreover,
        message disabling is set its default "off" value.
   
        <p>Existing categories are not removed. They are just reset.
  @@ -438,7 +438,7 @@
     public
     void resetConfiguration() {
   
  -    getRoot().setPriority(Priority.DEBUG);
  +    getRoot().setLevel(Level.DEBUG);
       root.setResourceBundle(null);
       enableAll();
       
  @@ -450,7 +450,7 @@
         Enumeration cats = getCurrentCategories();
         while(cats.hasMoreElements()) {
   	Category c = (Category) cats.nextElement();
  -	c.setPriority(null);
  +	c.setLevel(null);
   	c.setAdditivity(true);
   	c.setResourceBundle(null);
         }
  
  
  
  1.15      +9 -5      jakarta-log4j/src/java/org/apache/log4j/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Makefile,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Makefile	2001/08/14 21:00:34	1.14
  +++ Makefile	2001/09/02 20:05:39	1.15
  @@ -1,10 +1,8 @@
   
   PKG_DIR :=org/apache/log4j
   DEPTH   :=../../../../..
  -JSOURCES:=HTMLLayout.java\
  -	DailyRollingFileAppender.java\
  +JSOURCES:=DailyRollingFileAppender.java\
   	RollingFileAppender.java\
  -	PropertyConfigurator.java\
   	PatternLayout.java\
   	AsyncAppender.java\
   	NDC.java\
  @@ -15,16 +13,22 @@
   	FileAppender.java \
   	SimpleLayout.java\
   	TTCCLayout.java\
  -	BasicConfigurator.java\
   	Category.java \
   	Hierarchy.java\
  -	Layout.java \
  +        Layout.java \
   	Appender.java \
   	Priority.java\
   	WriterAppender.java\
   	ConsoleAppender.java\
           MDC.java\
  +        Level.java\
   
  +#        Logger.java\
  +#        LogManager.java\
  +
  +#       HTMLLayout.java\
  +#	PropertyConfigurator.java\
  +#	BasicConfigurator.java\
   
   ifdef $(ISJDK1)
    JSOURCES:=$(JSOURCES) RollingFileAppenderBeanInfo.java
  
  
  
  1.12      +1 -0      jakarta-log4j/src/java/org/apache/log4j/NDC.java
  
  Index: NDC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/NDC.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- NDC.java	2001/07/18 06:03:15	1.11
  +++ NDC.java	2001/09/02 20:05:39	1.12
  @@ -5,6 +5,7 @@
   
   
   //      Contributors:      Dan Milstein 
  +//                         Ray Millard
   
   package org.apache.log4j;
   
  
  
  
  1.10      +7 -175    jakarta-log4j/src/java/org/apache/log4j/Priority.java
  
  Index: Priority.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Priority.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Priority.java	2001/07/30 19:30:04	1.9
  +++ Priority.java	2001/09/02 20:05:39	1.10
  @@ -20,187 +20,19 @@
   
      @author Ceki G&uuml;lc&uuml;
    */
  -public class Priority {
  +public class Priority extends Level {
   
  -  int level;
  -  String levelStr;
  -  int syslogEquivalent;
   
  -  public final static int OFF_INT = Integer.MAX_VALUE;
  -  public final static int FATAL_INT = 50000;
  -  public final static int ERROR_INT = 40000;
  -  public final static int WARN_INT  = 30000;
  -  public final static int INFO_INT  = 20000;
  -  public final static int DEBUG_INT = 10000;
  -  public final static int ALL_INT = Integer.MIN_VALUE;
  -
  -
  -  /**
  -     The <code>OFF</code> is used to turn off logging.
  -   */
  -  final static public Priority OFF = new Priority(OFF_INT, "OFF", 0);
  -
  -
  -  /**
  -     The <code>FATAL</code> priority designates very severe error
  -     events that will presumably lead the application to abort.
  -   */
  -  final static public Priority FATAL = new Priority(FATAL_INT, "FATAL", 0);
  -
  -  /**
  -     The <code>ERROR</code> priority designates error events that
  -     might still allow the application to continue running.  */
  -  final static public Priority ERROR = new Priority(ERROR_INT, "ERROR", 3);
  -
  -  /**
  -     The <code>WARN</code> priority designates potentially harmful situations.
  -  */
  -  final static public Priority WARN  = new Priority(WARN_INT, "WARN",  4);
  -
  -  /**
  -     The <code>INFO</code> priority designates informational messages
  -     that highlight the progress of the application at coarse-grained
  -     level.  */
  -  final static public Priority INFO  = new Priority(INFO_INT, "INFO",  6);
  -
  -  /**
  -     The <code>DEBUG</code> priority designates fine-grained
  -     informational events that are most useful to debug an
  -     application.  */
  -  final static public Priority DEBUG = new Priority(DEBUG_INT, "DEBUG", 7);
  -
  -  /**
  -     The <code>ALL</code> is used to turn on all logging.
  -  */
  -  final static public Priority ALL = new Priority(ALL_INT, "ALL", 7);
  -
  -  
  +  //final static public Level DEBUG = Level.DEBUG;
  +  final static public Level INFO = Level.INFO;
  +  final static public Level WARN = Level.WARN;
  +    
     /**
  -     Instantiate a priority object.
  +     Instantiate a level object.
      */
     protected
     Priority(int level, String levelStr, int syslogEquivalent) {
  -    this.level = level;
  -    this.levelStr = levelStr;
  -    this.syslogEquivalent = syslogEquivalent;
  -  }
  -
  -  /**
  -     Return the syslog equivalent of this priority as an integer.
  -   */
  -  public
  -  final
  -  int getSyslogEquivalent() {
  -    return syslogEquivalent;
  -  }
  -
  -
  -  /**
  -     Returns the string representation of this priority.
  -   */
  -  final
  -  public
  -  String toString() {
  -    return levelStr;
  +    super(level, levelStr, syslogEquivalent);
     }
  -
  -  /**
  -     Returns the integer representation of this priority.
  -   */
  -  public
  -  final
  -  int toInt() {
  -    return level;
  -  }
  -
  -    
  -  /**
  -     Returns <code>true</code> if this priority has a higher or equal
  -     priority than the priority passed as argument, <code>false</code>
  -     otherwise.  
  -     
  -     <p>You should think twice before overriding the default
  -     implementation of <code>isGreaterOrEqual</code> method.
  -
  -  */
  -  public
  -  boolean isGreaterOrEqual(Priority r) {
  -    return level >= r.level;
  -  }
  -
  -  /**
  -     Return all possible priorities as an array of Priority objects in
  -     descending order.  */
  -  public
  -  static
  -  Priority[] getAllPossiblePriorities() {
  -    return new Priority[] {Priority.FATAL, Priority.ERROR, Priority.WARN, 
  -			     Priority.INFO, Priority.DEBUG};
  -  }
  -
  -
  -  /**
  -     Convert the string passed as argument to a priority. If the
  -     conversion fails, then this method returns {@link #DEBUG}. 
  -  */
  -  public
  -  static
  -  Priority toPriority(String sArg) {
  -    return toPriority(sArg, Priority.DEBUG);
  -  }
  -
  -  /**
  -    Convert an integer passed as argument to a priority. If the
  -    conversion fails, then this method returns {@link #DEBUG}.
  -
  -  */
  -  public
  -  static
  -  Priority toPriority(int val) {
  -    return toPriority(val, Priority.DEBUG);
  -  }
  -
  -  /**
  -    Convert an integer passed as argument to a priority. If the
  -    conversion fails, then this method returns the specified default.
  -  */
  -  public
  -  static
  -  Priority toPriority(int val, Priority defaultPriority) {
  -    switch(val) {
  -    case ALL_INT: return ALL;
  -    case DEBUG_INT: return DEBUG;
  -    case INFO_INT: return INFO;
  -    case WARN_INT: return WARN;
  -    case ERROR_INT: return ERROR;
  -    case FATAL_INT: return FATAL;
  -    case OFF_INT: return OFF;
  -    default: return defaultPriority;
  -    }
  -  }
  -
  -  /**
  -     Convert the string passed as argument to a priority. If the
  -     conversion fails, then this method returns the value of
  -     <code>defaultPriority</code>.  
  -  */
  -  public
  -  static
  -  Priority toPriority(String sArg, Priority defaultPriority) {                  
  -    if(sArg == null)
  -       return defaultPriority;
  -    
  -    String s = sArg.toUpperCase();
  -
  -    if(s.equals("ALL")) return Priority.ALL; 
  -    if(s.equals("DEBUG")) return Priority.DEBUG; 
  -    if(s.equals("INFO"))  return Priority.INFO;
  -    if(s.equals("WARN"))  return Priority.WARN;  
  -    if(s.equals("ERROR")) return Priority.ERROR;
  -    if(s.equals("FATAL")) return Priority.FATAL;
  -    if(s.equals("OFF")) return Priority.OFF;
  -    return defaultPriority;
  -  }
  -
   
   }
  
  
  
  1.31      +2 -2      jakarta-log4j/src/java/org/apache/log4j/PropertyConfigurator.java
  
  Index: PropertyConfigurator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/PropertyConfigurator.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- PropertyConfigurator.java	2001/07/30 19:30:04	1.30
  +++ PropertyConfigurator.java	2001/09/02 20:05:39	1.31
  @@ -571,8 +571,8 @@
                                   	 !catName.equals(INTERNAL_ROOT_NAME)) {
   	cat.setPriority(null);
         } else {
  -	cat.setPriority(OptionConverter.toPriority(priorityStr, 
  -						   Priority.DEBUG));
  +	cat.setLevel(OptionConverter.toLevel(priorityStr, 
  +					     Priority.DEBUG));
         }
         LogLog.debug("Category " + catName + " set to " + cat.getPriority());
       }
  
  
  
  1.9       +3 -3      jakarta-log4j/src/java/org/apache/log4j/SimpleLayout.java
  
  Index: SimpleLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/SimpleLayout.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SimpleLayout.java	2001/07/20 17:12:01	1.8
  +++ SimpleLayout.java	2001/09/02 20:05:39	1.9
  @@ -7,7 +7,7 @@
   import org.apache.log4j.spi.LoggingEvent;
   
   /**
  -   SimpleLayout consists of the priority of the log statement,
  +   SimpleLayout consists of the level of the log statement,
      followed by " - " and then the log message itself. For example,
   
      <pre>
  @@ -33,7 +33,7 @@
     
     /**
        Returns the log statement in a format consisting of the
  -     <code>priority</code>, followed by " - " and then the
  +     <code>level</code>, followed by " - " and then the
        <code>message</code>. For example, <pre> INFO - "A message"
        </pre>
   
  @@ -45,7 +45,7 @@
     String format(LoggingEvent event) {
   
       sbuf.setLength(0);
  -    sbuf.append(event.priority.toString());
  +    sbuf.append(event.level.toString());
       sbuf.append(" - ");
       sbuf.append(event.getRenderedMessage());
       sbuf.append(LINE_SEP);
  
  
  
  1.6       +27 -27    jakarta-log4j/src/java/org/apache/log4j/StressCategory.java
  
  Index: StressCategory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/StressCategory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StressCategory.java	2001/07/13 07:53:15	1.5
  +++ StressCategory.java	2001/09/02 20:05:39	1.6
  @@ -8,7 +8,7 @@
   package org.apache.log4j;
   
   
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.Category;
   import java.util.Random;
   
  @@ -19,13 +19,13 @@
   
   class StressCategory {
   
  -  static Priority[] priority = new Priority[] {Priority.DEBUG, 
  -					       Priority.INFO, 
  -					       Priority.WARN,
  -					       Priority.ERROR,
  -					       Priority.FATAL};
  +  static Level[] level = new Level[] {Level.DEBUG, 
  +					       Level.INFO, 
  +					       Level.WARN,
  +					       Level.ERROR,
  +					       Level.FATAL};
   
  -  static Priority defaultPriority = Category.getRoot().getPriority();
  +  static Level defaultLevel = Category.getRoot().getLevel();
     
     static int LENGTH;
     static String[] names;
  @@ -95,7 +95,7 @@
   
   
     // Loop through all possible 3^n combinations of not instantiating, 
  -  // instantiating and setting/not setting a priority.
  +  // instantiating and setting/not setting a level.
   
     static
     void createLoop(int n) {
  @@ -106,7 +106,7 @@
   	  cat[i] = null;
   	else {
   	  cat[i] = Category.getInstance(ct[i].catstr);
  -	  cat[i].setPriority(ct[i].priority);
  +	  cat[i].setLevel(ct[i].level);
   	}
         }
         test();
  @@ -121,7 +121,7 @@
         createLoop(n+1);  
         
         int r = random.nextInt(); if(r < 0) r = -r;
  -      ct[n]  = new CT(names[n], priority[r%5]);
  +      ct[n]  = new CT(names[n], level[r%5]);
         createLoop(n+1);
       }
     }
  @@ -151,7 +151,7 @@
       for(int j = 0; j < LENGTH; j++) {
          if(ct[j] != null) 
   	    System.out.println("ct [" + j + "] = ("+ct[j].catstr+"," + 
  -			       ct[j].priority + ")");
  +			       ct[j].level + ")");
          else 
   	 System.out.println("ct [" + j + "] = undefined");
       }
  @@ -162,7 +162,7 @@
       for(int j = 0; j < LENGTH; j++) {
         if(cat[j] != null)
   	System.out.println("cat[" + j + "] = (" + cat[j].name + "," +
  -			   cat[j].getPriority() + ")");
  +			   cat[j].getLevel() + ")");
         else
   	System.out.println("cat[" + j + "] = undefined"); 
       }
  @@ -186,16 +186,16 @@
       if(localCT == null) 
         return true;
       
  -    // find expected priority
  -    Priority expected = getExpectedPrioriy(localCT);
  +    // find expected level
  +    Level expected = getExpectedPrioriy(localCT);
   
   			    
  -    Priority purported = cat[i].getChainedPriority();
  +    Level purported = cat[i].getChainedLevel();
   
       if(expected != purported) {
  -      System.out.println("Expected priority for " + localCT.catstr + " is " +
  +      System.out.println("Expected level for " + localCT.catstr + " is " +
   		       expected);
  -      System.out.println("Purported priority for "+ cat[i].name + " is "+purported);
  +      System.out.println("Purported level for "+ cat[i].name + " is "+purported);
         return false;
       }
       return true;
  @@ -203,10 +203,10 @@
     }
   
     static
  -  Priority getExpectedPrioriy(CT ctParam) {
  -    Priority priority = ctParam.priority;
  -    if(priority != null) 
  -      return priority;
  +  Level getExpectedPrioriy(CT ctParam) {
  +    Level level = ctParam.level;
  +    if(level != null) 
  +      return level;
   
       
       String catstr = ctParam.catstr;    
  @@ -215,27 +215,27 @@
   	                              i = catstr.lastIndexOf('.', i-1))  {
         String substr = catstr.substring(0, i);
   
  -      // find the priority of ct corresponding to substr
  +      // find the level of ct corresponding to substr
         for(int j = 0; j < LENGTH; j++) {	
   	if(ct[j] != null && substr.equals(ct[j].catstr)) {
  -	  Priority p = ct[j].priority;
  +	  Level p = ct[j].level;
   	  if(p != null) 
   	    return p;	  
   	}
         }
       }
  -    return defaultPriority;
  +    return defaultLevel;
     }
   
     
   
     static class CT {
       public String   catstr;
  -    public Priority priority;
  +    public Level level;
   
  -    CT(String catstr,  Priority priority) {
  +    CT(String catstr,  Level level) {
         this.catstr = catstr;
  -      this.priority = priority;
  +      this.level = level;
       }
     }
   }
  
  
  
  1.10      +5 -5      jakarta-log4j/src/java/org/apache/log4j/TTCCLayout.java
  
  Index: TTCCLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/TTCCLayout.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TTCCLayout.java	2001/07/20 17:12:01	1.9
  +++ TTCCLayout.java	2001/09/02 20:05:39	1.10
  @@ -10,7 +10,7 @@
          
   package org.apache.log4j;
   
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.helpers.OptionConverter;
   import org.apache.log4j.helpers.LogLog;
   import org.apache.log4j.helpers.DateLayout;
  @@ -48,7 +48,7 @@
   
     <p>The first field is the number of milliseconds elapsed since the
     start of the program. The second field is the thread outputting the
  -  log statement. The third field is the priority, the fourth field is
  +  log statement. The third field is the level, the fourth field is
     the category to which the statement belongs.
   
     <p>The fifth field (just before the '-') is the nested diagnostic
  @@ -156,7 +156,7 @@
     }
   
     /**
  -   In addition to the priority of the statement and message, the
  +   In addition to the level of the statement and message, the
      returned byte array includes time, thread, category and {@link NDC}
      information.
      
  @@ -164,7 +164,7 @@
      depending on options.
      
       @param category
  -    @param priority
  +    @param level
       @param message
   
     */
  @@ -181,7 +181,7 @@
         buf.append(event.getThreadName());
         buf.append("] ");
       }
  -    buf.append(event.priority.toString());
  +    buf.append(event.level.toString());
       buf.append(' ');
   
       if(this.categoryPrefixing) {
  
  
  
  1.1                  jakarta-log4j/src/java/org/apache/log4j/LogManager.java
  
  Index: LogManager.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software
   * License version 1.1, a copy of which has been included with this
   * distribution in the LICENSE.txt file.  */
  
  package org.apache.log4j;
  
  import org.apache.log4j.spi.LoggerRepository;
  import org.apache.log4j.spi.LoggerFactory;
  import org.apache.log4j.spi.RepositorySelector;
  import org.apache.log4j.spi.DefaultRepositorySelector;
  import org.apache.log4j.spi.RootCategory;
  import org.apache.log4j.helpers.Loader;
  
  import java.util.Enumeration;
  
  /**
    Use the <code>LogManager</code> to retreive instances of {@link Logger}.
  
    @author Ceki G&uuml;lc&uuml;
  */
  public class LogManager {
  
    static private Object guard = null;
    static private RepositorySelector repositorySelector;
  
    static {
      Hierarchy h = new Hierarchy(new RootCategory(Level.DEBUG));
      repositorySelector = new DefaultRepositorySelector(h);    
    }
  
    /**
       Sets <code>LoggerFactory</code> but only if the correct
       <em>guard</em> is passed as parameter.
       
       <p>Initally the guard is null.  If the guard is
       <code>null</code>, then invoking this method sets the logger
       factory and the guard. Following invocations will throw a {@link
       IllegalArgumentException}, unless the previously set
       <code>guard</code> is passed as the second parameter.
  
       <p>This allows a high-level component to set the logger factory to
       be used. Thus, fixing the log4j environment.
       
       <p>For example, when tomcat starts it will be able to install its
       own logger factory. However, if and when Tomcat is embedded
       within JBoss, then JBoss will install its loggger factory and
       Tomcat will use the factory set by its container, JBoss.
    */
    static
    public
    void setRepositorySelector(RepositorySelector selector, Object guard) 
                                                   throws IllegalArgumentException {
      if((LogManager.guard != null) && (LogManager.guard != guard)) {
        throw new IllegalArgumentException(
             "Attempted to reset the LoggerFactory without possessing the guard.");
      }
  
      if(selector == null) {
        throw new IllegalArgumentException("RepositorySelector must be non-null.");
      }
  
      LogManager.guard = guard;
      LogManager.repositorySelector = selector;
  
    }
  
    static
    public
    LoggerRepository getLoggerRepository() {
      return repositorySelector.getLoggerRepository();
    }
  
    /**
       Retrieve the appropriate root logger.
     */
    public
    static 
    Logger getRootLogger() {
       // Delegate the actual manufacturing of the logger to the logger repository.
      return repositorySelector.getLoggerRepository().getRootLogger();
    }
  
    /**
       Retrieve the appropriate {@link Logger} instance.  
    */
    public
    static 
    Logger getLogger(String name) {
       // Delegate the actual manufacturing of the logger to the logger factory.
      return repositorySelector.getLoggerRepository().getLogger(name);
    }
  
    /**
       Retrieve the appropriate {@link Logger} instance.  
    */
    public
    static 
    Logger getLogger(String name, LoggerFactory factory) {
       // Delegate the actual manufacturing of the logger to the logger factory.
      return repositorySelector.getLoggerRepository().getLogger(name, factory);
    }  
  
    public
    static
    Logger exists(String name) {
      return repositorySelector.getLoggerRepository().exists(name);
    }
  
    public
    static
    Enumeration getCurrentLoggers() {
      return repositorySelector.getLoggerRepository().getCurrentLoggers();
    }
  
    public
    static
    void shutdown() {
      repositorySelector.getLoggerRepository().shutdown();
    }
  
    public
    static
    void resetConfiguration() {
      repositorySelector.getLoggerRepository().resetConfiguration();
    }
  }
  
  
  
  
  1.2       +2 -2      jakarta-log4j/src/java/org/apache/log4j/config/PropertyPrinter.java
  
  Index: PropertyPrinter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/config/PropertyPrinter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PropertyPrinter.java	2001/03/19 12:31:42	1.1
  +++ PropertyPrinter.java	2001/09/02 20:05:39	1.2
  @@ -78,7 +78,7 @@
     protected
     void printOptions(PrintWriter out, Category cat) {
       Enumeration appenders = cat.getAllAppenders();
  -    Priority prio = cat.getPriority();
  +    Level prio = cat.getLevel();
       String appenderString = (prio == null ? "" : prio.toString());
       
       while (appenders.hasMoreElements()) {
  @@ -140,4 +140,4 @@
     public static void main(String[] args) {
       new PropertyPrinter(new PrintWriter(System.out));
     }
  -}
  \ No newline at end of file
  +}
  
  
  
  1.8       +2 -2      jakarta-log4j/src/java/org/apache/log4j/config/PropertySetter.java
  
  Index: PropertySetter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/config/PropertySetter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PropertySetter.java	2001/07/20 17:12:01	1.7
  +++ PropertySetter.java	2001/09/02 20:05:39	1.8
  @@ -222,8 +222,8 @@
         } else if ("false".equalsIgnoreCase(v)) {
           return Boolean.FALSE;
         }
  -    } else if (Priority.class.isAssignableFrom(type)) {
  -      return OptionConverter.toPriority(v, Priority.DEBUG);
  +    } else if (Level.class.isAssignableFrom(type)) {
  +      return OptionConverter.toLevel(v, Level.DEBUG);
       }
       return null;
     }
  
  
  
  1.13      +3 -3      jakarta-log4j/src/java/org/apache/log4j/examples/MyCategory.java
  
  Index: MyCategory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/examples/MyCategory.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- MyCategory.java	2001/06/26 19:40:08	1.12
  +++ MyCategory.java	2001/09/02 20:05:39	1.13
  @@ -10,7 +10,7 @@
   import org.apache.log4j.*;
   import org.apache.log4j.spi.CategoryFactory;
   import org.apache.log4j.xml.DOMConfigurator;
  -import org.apache.log4j.xml.examples.XPriority;
  +import org.apache.log4j.xml.examples.XLevel;
   import org.apache.log4j.PropertyConfigurator;
   import org.apache.log4j.helpers.LogLog;
   
  @@ -46,7 +46,7 @@
        end of each message.  */
     public 
     void debug(Object message) {
  -    super.log(FQCN, Priority.DEBUG, message + " world.", null);    
  +    super.log(FQCN, Level.DEBUG, message + " world.", null);    
     }
     
     /**
  @@ -61,7 +61,7 @@
   
     public
     void trace(Object message) {
  -    super.log(FQCN, XPriority.TRACE, message, null); 
  +    super.log(FQCN, XLevel.TRACE, message, null); 
     }
   }
   
  
  
  
  1.2       +1 -1      jakarta-log4j/src/java/org/apache/log4j/examples/MyCategoryTest.java
  
  Index: MyCategoryTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/examples/MyCategoryTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MyCategoryTest.java	2001/06/26 10:57:47	1.1
  +++ MyCategoryTest.java	2001/09/02 20:05:39	1.2
  @@ -10,7 +10,7 @@
   import org.apache.log4j.*;
   import org.apache.log4j.spi.CategoryFactory;
   import org.apache.log4j.xml.DOMConfigurator;
  -import org.apache.log4j.xml.examples.XPriority;
  +import org.apache.log4j.xml.examples.XLevel;
   import org.apache.log4j.PropertyConfigurator;
   import org.apache.log4j.helpers.LogLog;
   
  
  
  
  1.26      +36 -42    jakarta-log4j/src/java/org/apache/log4j/helpers/OptionConverter.java
  
  Index: OptionConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/helpers/OptionConverter.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- OptionConverter.java	2001/08/20 20:35:52	1.25
  +++ OptionConverter.java	2001/09/02 20:05:39	1.26
  @@ -12,9 +12,8 @@
   import java.net.URL;
   import org.apache.log4j.Category;
   import org.apache.log4j.Hierarchy;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.spi.Configurator;
  -import org.apache.log4j.xml.DOMConfigurator;
   import org.apache.log4j.PropertyConfigurator;
   
   // Contributors:   Avy Sharell (sharell@online.fr)
  @@ -154,28 +153,28 @@
     }
   
     /**
  -     Converts a standard or custom priority level to a Priority
  +     Converts a standard or custom priority level to a Level
        object.  <p> If <code>value</code> is of form
  -     "priority#classname", then the specified class' toPriority method
  -     is called to process the specified priority string; if no '#'
  -     character is present, then the default {@link org.apache.log4j.Priority}
  -     class is used to process the priority value.  
  +     "level#classname", then the specified class' toLevel method
  +     is called to process the specified level string; if no '#'
  +     character is present, then the default {@link org.apache.log4j.Level}
  +     class is used to process the level value.  
   
        <p>As a special case, if the <code>value</code> parameter is
        equal to the string "NULL", then the value <code>null</code> will
        be returned.
   
  -     <p> If any error occurs while converting the value to a priority,
  +     <p> If any error occurs while converting the value to a level,
        the <code>defaultValue</code> parameter, which may be
        <code>null</code>, is returned.
   
  -     <p> Case of <code>value</code> is insignificant for the priority level, but is
  +     <p> Case of <code>value</code> is insignificant for the level level, but is
        significant for the class name part, if present.
        
        @since 1.1 */
     public
     static
  -  Priority toPriority(String value, Priority defaultValue) {
  +  Level toLevel(String value, Level defaultValue) {
       if(value == null)
         return defaultValue;
   
  @@ -184,56 +183,56 @@
         if("NULL".equalsIgnoreCase(value)) {
   	return null;
         } else {
  -	// no class name specified : use standard Priority class
  -	return Priority.toPriority(value, defaultValue);
  +	// no class name specified : use standard Level class
  +	return Level.toLevel(value, defaultValue);
         }
       }
   
  -    Priority result = defaultValue;
  +    Level result = defaultValue;
   
       String clazz = value.substring(hashIndex+1);
  -    String priorityName = value.substring(0, hashIndex);
  +    String levelName = value.substring(0, hashIndex);
       
       // This is degenerate case but you never know.
  -    if("NULL".equalsIgnoreCase(priorityName)) {
  +    if("NULL".equalsIgnoreCase(levelName)) {
   	return null;
       }
   
  -    LogLog.debug("toPriority" + ":class=[" + clazz + "]" 
  -		 + ":pri=[" + priorityName + "]");
  +    LogLog.debug("toLevel" + ":class=[" + clazz + "]" 
  +		 + ":pri=[" + levelName + "]");
   
       try {
  -      Class customPriority = Loader.loadClass(clazz);
  +      Class customLevel = Loader.loadClass(clazz);
   
         // get a ref to the specified class' static method
  -      // toPriority(String, org.apache.log4j.Priority)
  +      // toLevel(String, org.apache.log4j.Level)
         Class[] paramTypes = new Class[] { String.class,
  -					 org.apache.log4j.Priority.class
  +					 org.apache.log4j.Level.class
                                          };
  -      java.lang.reflect.Method toPriorityMethod =
  -                      customPriority.getMethod("toPriority", paramTypes);
  +      java.lang.reflect.Method toLevelMethod =
  +                      customLevel.getMethod("toLevel", paramTypes);
   
  -      // now call the toPriority method, passing priority string + default
  -      Object[] params = new Object[] {priorityName, defaultValue};
  -      Object o = toPriorityMethod.invoke(null, params);
  +      // now call the toLevel method, passing level string + default
  +      Object[] params = new Object[] {levelName, defaultValue};
  +      Object o = toLevelMethod.invoke(null, params);
   
  -      result = (Priority) o;
  +      result = (Level) o;
       } catch(ClassNotFoundException e) {
  -      LogLog.warn("custom priority class [" + clazz + "] not found.");
  +      LogLog.warn("custom level class [" + clazz + "] not found.");
       } catch(NoSuchMethodException e) {
  -      LogLog.warn("custom priority class [" + clazz + "]"
  +      LogLog.warn("custom level class [" + clazz + "]"
           + " does not have a constructor which takes one string parameter", e);
       } catch(java.lang.reflect.InvocationTargetException e) {
  -      LogLog.warn("custom priority class [" + clazz + "]"
  +      LogLog.warn("custom level class [" + clazz + "]"
   		   + " could not be instantiated", e);
       } catch(ClassCastException e) {
         LogLog.warn("class [" + clazz
  -        + "] is not a subclass of org.apache.log4j.Priority", e);
  +        + "] is not a subclass of org.apache.log4j.Level", e);
       } catch(IllegalAccessException e) {
         LogLog.warn("class ["+clazz+
   		   "] cannot be instantiated due to access restrictions", e);
       } catch(Exception e) {
  -      LogLog.warn("class ["+clazz+"], priority ["+priorityName+
  +      LogLog.warn("class ["+clazz+"], level ["+levelName+
   		   "] conversion failed.", e);
       }
       return result;
  @@ -433,7 +432,12 @@
     void selectAndConfigure(URL url, String clazz,  Hierarchy hierarchy) {
   
       Configurator configurator = null;
  +    String filename = url.getFile();
   
  +    if(clazz == null && filename != null && filename.endsWith(".xml")) {
  +      clazz = "org.apache.log4j.xml.DOMConfigurator";
  +    }
  +
       if(clazz != null) {
         LogLog.debug("Preferred configurator class: " + clazz);
         configurator = (Configurator) instantiateByClassName(clazz, 
  @@ -444,17 +448,7 @@
   	return;
         }
       } else {
  -      String filename = url.getFile();
  -      if(filename != null && filename.endsWith(".xml")) {
  -	try {
  -	  configurator = new DOMConfigurator();
  -	} catch(NoClassDefFoundError e) {
  -	  LogLog.warn("Could not find DOMConfigurator!", e);
  -	  return;
  -	}
  -      } else {
  -	configurator = new PropertyConfigurator();
  -      }
  +      configurator = new PropertyConfigurator();
       }
   
       configurator.doConfigure(url, hierarchy);
  
  
  
  1.14      +5 -5      jakarta-log4j/src/java/org/apache/log4j/helpers/PatternParser.java
  
  Index: PatternParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/helpers/PatternParser.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PatternParser.java	2001/08/14 21:00:34	1.13
  +++ PatternParser.java	2001/09/02 20:05:39	1.14
  @@ -56,7 +56,7 @@
   
     static final int RELATIVE_TIME_CONVERTER = 2000;
     static final int THREAD_CONVERTER = 2001;
  -  static final int PRIORITY_CONVERTER = 2002;
  +  static final int LEVEL_CONVERTER = 2002;
     static final int NDC_CONVERTER = 2003;
     static final int MESSAGE_CONVERTER = 2004;
   
  @@ -308,8 +308,8 @@
         currentLiteral.setLength(0);
         break;
       case 'p':
  -      pc = new BasicPatternConverter(formattingInfo, PRIORITY_CONVERTER);
  -      //LogLog.debug("PRIORITY converter.");
  +      pc = new BasicPatternConverter(formattingInfo, LEVEL_CONVERTER);
  +      //LogLog.debug("LEVEL converter.");
         //formattingInfo.dump();
         currentLiteral.setLength(0);
         break;
  @@ -390,8 +390,8 @@
   	return (Long.toString(event.timeStamp - LoggingEvent.getStartTime()));
         case THREAD_CONVERTER:
   	return event.getThreadName();
  -      case PRIORITY_CONVERTER:
  -	return event.priority.toString();
  +      case LEVEL_CONVERTER:
  +	return event.level.toString();
         case NDC_CONVERTER:  
   	return event.getNDC();
         case MESSAGE_CONVERTER: {
  
  
  
  1.4       +5 -5      jakarta-log4j/src/java/org/apache/log4j/helpers/SyslogQuietWriter.java
  
  Index: SyslogQuietWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/helpers/SyslogQuietWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SyslogQuietWriter.java	2001/07/05 19:09:46	1.3
  +++ SyslogQuietWriter.java	2001/09/02 20:05:39	1.4
  @@ -17,14 +17,14 @@
   
   /**
      SyslogQuietWriter extends QuietWriter by prepending the syslog
  -   priority code before each printed String.
  +   level code before each printed String.
   
      @since 0.7.3
   */
   public class SyslogQuietWriter extends QuietWriter {
   
     int syslogFacility;
  -  int priority;
  +  int level;
   
     public
     SyslogQuietWriter(Writer writer, int syslogFacility, ErrorHandler eh) {
  @@ -33,8 +33,8 @@
     }
   
     public
  -  void setPriority(int priority) {
  -    this.priority = priority;
  +  void setLevel(int level) {
  +    this.level = level;
     }
   
     public
  @@ -44,6 +44,6 @@
     
     public
     void write(String string) {
  -    super.write("<"+(syslogFacility | priority)+">" + string);
  +    super.write("<"+(syslogFacility | level)+">" + string);
     }
   }
  
  
  
  1.26      +5 -5      jakarta-log4j/src/java/org/apache/log4j/net/SMTPAppender.java
  
  Index: SMTPAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/SMTPAppender.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- SMTPAppender.java	2001/07/25 19:43:44	1.25
  +++ SMTPAppender.java	2001/09/02 20:05:39	1.26
  @@ -9,7 +9,7 @@
   
   import org.apache.log4j.AppenderSkeleton;
   import org.apache.log4j.Layout;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.helpers.CyclicBuffer;
   import org.apache.log4j.helpers.OptionConverter;
   import org.apache.log4j.helpers.LogLog;
  @@ -63,7 +63,7 @@
     /**
        The default constructor will instantiate the appender with a
        {@link TriggeringEventEvaluator} that will trigger on events with
  -     priority ERROR or higher.*/
  +     level ERROR or higher.*/
     public
     SMTPAppender() {
       this(new DefaultEvaluator());
  @@ -384,11 +384,11 @@
     /**
        Is this <code>event</code> the e-mail triggering event?
        
  -     <p>This method returns <code>true</code>, if the event priority
  -     has ERROR priority or higher. Otherwise it returns
  +     <p>This method returns <code>true</code>, if the event level
  +     has ERROR level or higher. Otherwise it returns
        <code>false</code>. */
     public 
     boolean isTriggeringEvent(LoggingEvent event) {
  -    return event.priority.isGreaterOrEqual(Priority.ERROR); 
  +    return event.level.isGreaterOrEqual(Level.ERROR); 
     }
   }
  
  
  
  1.10      +2 -2      jakarta-log4j/src/java/org/apache/log4j/net/SocketNode.java
  
  Index: SocketNode.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/SocketNode.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SocketNode.java	2001/08/07 22:23:58	1.9
  +++ SocketNode.java	2001/09/02 20:05:39	1.10
  @@ -19,7 +19,7 @@
   import org.apache.log4j.Category;
   import org.apache.log4j.Hierarchy;
   import org.apache.log4j.spi.LoggingEvent;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.NDC;
   
   // Contributors:  Moses Hohman <mm...@rainbow.uchicago.edu>
  @@ -71,7 +71,7 @@
   	event = (LoggingEvent) ois.readObject();	
   	remoteCategory = hierarchy.getInstance(event.categoryName);
   	event.category = remoteCategory;
  -	if(event.priority.isGreaterOrEqual(remoteCategory.getChainedPriority())) {
  +	if(event.level.isGreaterOrEqual(remoteCategory.getChainedLevel())) {
   	  remoteCategory.callAppenders(event);	
   	}
         }
  
  
  
  1.14      +3 -3      jakarta-log4j/src/java/org/apache/log4j/net/SyslogAppender.java
  
  Index: SyslogAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/SyslogAppender.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SyslogAppender.java	2001/08/09 20:16:31	1.13
  +++ SyslogAppender.java	2001/09/02 20:05:39	1.14
  @@ -17,7 +17,7 @@
   import org.apache.log4j.AppenderSkeleton;
   import org.apache.log4j.spi.LoggingEvent;
   import org.apache.log4j.Category;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.Layout;
   import org.apache.log4j.helpers.SyslogWriter;
   import org.apache.log4j.helpers.SyslogQuietWriter;
  @@ -237,7 +237,7 @@
     public
     void append(LoggingEvent event) {
   
  -    if(!isAsSevereAsThreshold(event.priority))
  +    if(!isAsSevereAsThreshold(event.level))
         return;
       
       // We must not attempt to append if sqw is null.
  @@ -250,7 +250,7 @@
       String buffer = (facilityPrinting? facilityStr : "") +
                             layout.format(event);
   
  -    sqw.setPriority(event.priority.getSyslogEquivalent());    
  +    sqw.setLevel(event.level.getSyslogEquivalent());    
       sqw.write(buffer);
   
       String[] s = event.getThrowableStrRep();
  
  
  
  1.14      +9 -9      jakarta-log4j/src/java/org/apache/log4j/nt/NTEventLogAppender.java
  
  Index: NTEventLogAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/nt/NTEventLogAppender.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- NTEventLogAppender.java	2001/07/26 11:16:48	1.13
  +++ NTEventLogAppender.java	2001/09/02 20:05:39	1.14
  @@ -9,7 +9,7 @@
   
   import org.apache.log4j.*;
   import org.apache.log4j.spi.LoggingEvent;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.helpers.OptionConverter;
   import org.apache.log4j.helpers.LogLog;
   
  @@ -34,11 +34,11 @@
     private String source = null;
     private String server = null;
   
  -  private static final int FATAL  = Priority.FATAL.toInt();
  -  private static final int ERROR  = Priority.ERROR.toInt();
  -  private static final int WARN   = Priority.WARN.toInt();
  -  private static final int INFO   = Priority.INFO.toInt();
  -  private static final int DEBUG  = Priority.DEBUG.toInt();
  +  private static final int FATAL  = Level.FATAL.toInt();
  +  private static final int ERROR  = Level.ERROR.toInt();
  +  private static final int WARN   = Level.WARN.toInt();
  +  private static final int INFO   = Level.INFO.toInt();
  +  private static final int DEBUG  = Level.DEBUG.toInt();
     
     public NTEventLogAppender() {
       this(null, null, null);
  @@ -110,8 +110,8 @@
   	}	
         }
       }
  -    // Normalize the log message priority into the supported categories
  -    int nt_category = event.priority.toInt();
  +    // Normalize the log message level into the supported categories
  +    int nt_category = event.level.toInt();
   
       // Anything above FATAL or below DEBUG is labeled as INFO.
       //if (nt_category > FATAL || nt_category < DEBUG) {
  @@ -150,7 +150,7 @@
     }
     
     native private int registerEventSource(String server, String source);
  -  native private void reportEvent(int handle, String message, int priority);
  +  native private void reportEvent(int handle, String message, int level);
     native private void deregisterEventSource(int handle);
     
     static {
  
  
  
  1.6       +3 -3      jakarta-log4j/src/java/org/apache/log4j/performance/NotLogging.java
  
  Index: NotLogging.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/performance/NotLogging.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NotLogging.java	2001/06/19 15:44:56	1.5
  +++ NotLogging.java	2001/09/02 20:05:40	1.6
  @@ -10,7 +10,7 @@
   import org.apache.log4j.ConsoleAppender;
   import org.apache.log4j.Layout;
   
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   
   /**
      Measure the performance of evaluating whether to log or not to log,
  @@ -132,8 +132,8 @@
       } else 
         Usage();
   
  -    SHORT_CAT.setPriority(Priority.INFO);      
  -    Category.getRoot().setPriority(Priority.INFO);
  +    SHORT_CAT.setLevel(Level.INFO);      
  +    Category.getRoot().setLevel(Level.INFO);
   
     }    
     
  
  
  
  1.19      +21 -21    jakarta-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java
  
  Index: LoggingEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- LoggingEvent.java	2001/08/14 21:00:34	1.18
  +++ LoggingEvent.java	2001/09/02 20:05:40	1.19
  @@ -8,7 +8,7 @@
   package org.apache.log4j.spi;
   
   import org.apache.log4j.Category;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.NDC;
   import org.apache.log4j.MDC;
   
  @@ -55,10 +55,10 @@
     /** The category name. */
     public final String categoryName;
     
  -  /** Priority of logging event. Priority cannot be serializable
  +  /** Level of logging event. Level cannot be serializable
         because it is a flyweight.  Due to its special seralization it
         cannot be declared final either. */
  -  transient public Priority priority;
  +  transient public Level level;
   
     /** The nested diagnostic context (NDC) of logging event. */
     private String ndc;
  @@ -107,8 +107,8 @@
     static final long serialVersionUID = -868428216207166145L;
   
     static final Integer[] PARAM_ARRAY = new Integer[1];
  -  static final String TO_PRIORITY = "toPriority";
  -  static final Class[] TO_PRIORITY_PARAMS = new Class[] {int.class};
  +  static final String TO_LEVEL = "toLevel";
  +  static final Class[] TO_LEVEL_PARAMS = new Class[] {int.class};
     static final Hashtable methodCache = new Hashtable(3); // use a tiny table
   
     /**
  @@ -118,15 +118,15 @@
        <code>LoggingEvent</code> are filled when actually needed.
        <p>
        @param category The category of this event.
  -     @param priority The priority of this event.
  +     @param level The level of this event.
        @param message  The message of this event.
        @param throwable The throwable of this event.  */
     public LoggingEvent(String fqnOfCategoryClass, Category category, 
  -		      Priority priority, Object message, Throwable throwable) {
  +		      Level level, Object message, Throwable throwable) {
       this.fqnOfCategoryClass = fqnOfCategoryClass;
       this.category = category;
       this.categoryName = category.getName();
  -    this.priority = priority;
  +    this.level = level;
       this.message = message;
       if(throwable != null) {
         this.throwableInfo = new ThrowableInformation(throwable);
  @@ -263,34 +263,34 @@
   	
   
     private 
  -  void readPriority(ObjectInputStream ois) 
  +  void readLevel(ObjectInputStream ois) 
                         throws java.io.IOException, ClassNotFoundException {
   
       int p = ois.readInt();
       try {
         String className = (String) ois.readObject();      
         if(className == null) {
  -	priority = Priority.toPriority(p);
  +	level = Level.toLevel(p);
         } else {
   	Method m = (Method) methodCache.get(className);	
   	if(m == null) {
   	  Class clazz = Loader.loadClass(className);
  -	  m = clazz.getDeclaredMethod(TO_PRIORITY, TO_PRIORITY_PARAMS);
  +	  m = clazz.getDeclaredMethod(TO_LEVEL, TO_LEVEL_PARAMS);
   	  methodCache.put(className, m);
   	}      
   	PARAM_ARRAY[0] = new Integer(p);
  -	priority = (Priority) m.invoke(null,  PARAM_ARRAY);
  +	level = (Level) m.invoke(null,  PARAM_ARRAY);
         }
       } catch(Exception e) {
  -	LogLog.warn("Priority deserialization failed, reverting to default.", e);
  -	priority = Priority.toPriority(p);
  +	LogLog.warn("Level deserialization failed, reverting to default.", e);
  +	level = Level.toLevel(p);
       }
     }
   
     private void readObject(ObjectInputStream ois)
                           throws java.io.IOException, ClassNotFoundException {
       ois.defaultReadObject();    
  -    readPriority(ois);
  +    readLevel(ois);
   
       // Make sure that no location info is available to Layouts
       if(locationInfo == null)
  @@ -315,17 +315,17 @@
   
       oos.defaultWriteObject();
       
  -    // serialize this event's priority
  -    writePriority(oos);
  +    // serialize this event's level
  +    writeLevel(oos);
     }
   
     private 
  -  void writePriority(ObjectOutputStream oos) throws java.io.IOException {
  +  void writeLevel(ObjectOutputStream oos) throws java.io.IOException {
   
  -    oos.writeInt(priority.toInt());
  +    oos.writeInt(level.toInt());
   
  -    Class clazz = priority.getClass();
  -    if(clazz == Priority.class) {
  +    Class clazz = level.getClass();
  +    if(clazz == Level.class) {
         oos.writeObject(null);
       } else {
         // writing directly the Class object would be nicer, except that
  
  
  
  1.9       +4 -1      jakarta-log4j/src/java/org/apache/log4j/spi/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/spi/Makefile,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Makefile	2001/07/20 15:56:03	1.8
  +++ Makefile	2001/09/02 20:05:40	1.9
  @@ -9,11 +9,14 @@
   	Filter.java\
           ErrorHandler.java\
   	ErrorCode.java\
  -	CategoryFactory.java\
   	Configurator.java\
           ThrowableInformation.java\
   	TriggeringEventEvaluator.java\
           HierarchyEventListener.java\
  +
  +#        LoggerRepository.java\
  +#        DefaultRepositorySelector.java\
  +#        LoggerFactory.java\
   
   SUBDIRS := 
   
  
  
  
  1.7       +12 -12    jakarta-log4j/src/java/org/apache/log4j/spi/RootCategory.java
  
  Index: RootCategory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/spi/RootCategory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RootCategory.java	2001/07/05 19:07:21	1.6
  +++ RootCategory.java	2001/09/02 20:05:40	1.7
  @@ -8,7 +8,7 @@
   package org.apache.log4j.spi;
   
   import  org.apache.log4j.Category;
  -import  org.apache.log4j.Priority;
  +import  org.apache.log4j.Level;
   import  org.apache.log4j.helpers.LogLog;
   
   // Contibutors: Mathias Bogaert
  @@ -20,7 +20,7 @@
      <p>First, it cannot be assigned a <code>null</code>
      priority. Second, since root category cannot have a parent, the
      {@link #getChainedPriority} method always returns the value of the
  -   priority field without walking the hierarchy.
  +   level field without walking the hierarchy.
   
      @author Ceki G&uuml;lc&uuml;
   
  @@ -32,36 +32,36 @@
        category cannot be retrieved by name.  
     */
     public
  -  RootCategory(Priority priority) {
  +  RootCategory(Level level) {
       super("root");
  -    setPriority(priority);
  +    setLevel(level);
     }
   
     
     /**
  -     Return the assigned priority value without walking the category
  +     Return the assigned level value without walking the category
        hierarchy.
     */
     final
     public 
  -  Priority getChainedPriority() {
  -    return priority;
  +  Level getChainedLevel() {
  +    return level;
     }
   
     /**
  -     Setting a null value to the priority of the root category may have catastrophic
  +     Setting a null value to the level of the root category may have catastrophic
        results. We prevent this here.
   
        @since 0.8.3 */
     final  
     public
  -  void setPriority(Priority priority) {
  -    if(priority == null) {
  -      LogLog.error("You have tried to set a null priority to root.",
  +  void setLevel(Level level) {
  +    if(level == null) {
  +      LogLog.error("You have tried to set a null level to root.",
   		   new Throwable());
       }
       else {
  -      this.priority = priority;
  +      this.level = level;
       }
     }
   }
  
  
  
  1.2       +2 -2      jakarta-log4j/src/java/org/apache/log4j/test/CustomCategoryTest.java
  
  Index: CustomCategoryTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/CustomCategoryTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CustomCategoryTest.java	2001/05/20 13:21:57	1.1
  +++ CustomCategoryTest.java	2001/09/02 20:05:40	1.2
  @@ -10,8 +10,8 @@
   import org.apache.log4j.xml.DOMConfigurator;
   import org.apache.log4j.Category;
   import org.apache.log4j.NDC;
  -import org.apache.log4j.Priority;
  -import org.apache.log4j.xml.examples.XPriority;
  +import org.apache.log4j.Level;
  +import org.apache.log4j.xml.examples.XLevel;
   import org.apache.log4j.xml.examples.XCategory;
   import java.io.IOException;
   import java.util.Enumeration;
  
  
  
  1.4       +16 -16    jakarta-log4j/src/java/org/apache/log4j/test/Min.java
  
  Index: Min.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/Min.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Min.java	2001/02/13 17:37:30	1.3
  +++ Min.java	2001/09/02 20:05:40	1.4
  @@ -14,7 +14,7 @@
   import org.apache.log4j.net.SyslogAppender;
   import org.apache.log4j.SimpleLayout;
   import org.apache.log4j.TTCCLayout;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.BasicConfigurator;
   import org.apache.log4j.helpers.AbsoluteTimeDateFormat;
   import java.io.IOException;
  @@ -80,54 +80,54 @@
       int i = 0;
   
       // In the lines below, the category names are chosen as an aid in
  -    // remembering their priority values. In general, the category
  -    // names should have no bearing to priority values.
  +    // remembering their level values. In general, the category
  +    // names should have no bearing to level values.
       
       Category ERR = Category.getInstance("ERR");
  -    ERR.setPriority(Priority.ERROR);
  +    ERR.setLevel(Level.ERROR);
       Category INF = Category.getInstance("INF");
  -    INF.setPriority(Priority.INFO);
  +    INF.setLevel(Level.INFO);
       Category INF_ERR = Category.getInstance("INF.ERR");
  -    INF_ERR.setPriority(Priority.ERROR);
  +    INF_ERR.setLevel(Level.ERROR);
       Category DEB = Category.getInstance("DEB");
  -    DEB.setPriority(Priority.DEBUG);
  +    DEB.setLevel(Level.DEBUG);
       
  -    // Note: categories with undefined priority 
  +    // Note: categories with undefined level 
       Category INF_UNDEF = Category.getInstance("INF.UNDEF");
       Category INF_ERR_UNDEF = Category.getInstance("INF.ERR.UNDEF");    
       Category UNDEF = Category.getInstance("UNDEF");   
   
   
       // These should all log.----------------------------
  -    ERR.log(Priority.FATAL, "Message " + i); i++;  //0
  +    ERR.log(Level.FATAL, "Message " + i); i++;  //0
       ERR.error( "Message " + i); i++;          
   
  -    INF.log(Priority.FATAL, "Message " + i); i++; // 2
  +    INF.log(Level.FATAL, "Message " + i); i++; // 2
       INF.error( "Message " + i); i++;         
       INF.warn ( "Message " + i); i++; 
       INF.info ( "Message " + i); i++;
   
  -    INF_UNDEF.log(Priority.FATAL, "Message " + i); i++;  //6
  +    INF_UNDEF.log(Level.FATAL, "Message " + i); i++;  //6
       INF_UNDEF.error( "Message " + i); i++;         
       INF_UNDEF.warn ( "Message " + i); i++; 
       INF_UNDEF.info ( "Message " + i); i++; 
       
       
  -    INF_ERR.log(Priority.FATAL, "Message " + i); i++;  // 10
  +    INF_ERR.log(Level.FATAL, "Message " + i); i++;  // 10
       INF_ERR.error( "Message " + i); i++;  
   
  -     INF_ERR_UNDEF.log(Priority.FATAL, "Message " + i); i++; 
  +     INF_ERR_UNDEF.log(Level.FATAL, "Message " + i); i++; 
       INF_ERR_UNDEF.error( "Message " + i); i++;             
   
  -    DEB.log(Priority.FATAL, "Message " + i); i++;  //14
  +    DEB.log(Level.FATAL, "Message " + i); i++;  //14
       DEB.error( "Message " + i); i++;         
       DEB.warn ( "Message " + i); i++; 
       DEB.info ( "Message " + i); i++; 
       DEB.debug( "Message " + i); i++; 
   
       
  -    // defaultPriority=DEBUG
  -    UNDEF.log(Priority.FATAL, "Message " + i); i++;  // 19
  +    // defaultLevel=DEBUG
  +    UNDEF.log(Level.FATAL, "Message " + i); i++;  // 19
       UNDEF.error("Message " + i); i++;         
       UNDEF.warn ("Message " + i); i++; 
       UNDEF.info ("Message " + i); i++; 
  
  
  
  1.4       +1 -2      jakarta-log4j/src/java/org/apache/log4j/test/StressNDC.java
  
  Index: StressNDC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/StressNDC.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StressNDC.java	2001/08/06 19:29:19	1.3
  +++ StressNDC.java	2001/09/02 20:05:40	1.4
  @@ -8,7 +8,7 @@
   import org.apache.log4j.FileAppender;
   import org.apache.log4j.SimpleLayout;
   import org.apache.log4j.BasicConfigurator;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.NDC;
   
   
  @@ -43,7 +43,6 @@
     public 
     static 
     void main(String args[]) {
  -    root.setPriority(Priority.DEBUG);
       BasicConfigurator.configure();
   
       if(args.length != 1) {
  
  
  
  1.5       +14 -14    jakarta-log4j/src/java/org/apache/log4j/test/UnitTestCategory.java
  
  Index: UnitTestCategory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/UnitTestCategory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- UnitTestCategory.java	2001/01/22 22:11:33	1.4
  +++ UnitTestCategory.java	2001/09/02 20:05:40	1.5
  @@ -8,7 +8,7 @@
   package org.apache.log4j.test;
   
   import org.apache.log4j.spi.LoggingEvent;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.FileAppender;
   import org.apache.log4j.BasicConfigurator;
   import org.apache.log4j.Appender;
  @@ -217,31 +217,31 @@
   
       root.debug(MSG); assertEquals(caRoot.counter, 0);  
       root.info(MSG); assertEquals(caRoot.counter, 1);  
  -    root.log(Priority.WARN, MSG); assertEquals(caRoot.counter, 2);  
  +    root.log(Level.WARN, MSG); assertEquals(caRoot.counter, 2);  
       root.warn(MSG); assertEquals(caRoot.counter, 3);  
   
       h.disableInfo();
       root.debug(MSG); assertEquals(caRoot.counter, 3);  
       root.info(MSG); assertEquals(caRoot.counter, 3);  
  -    root.log(Priority.WARN, MSG); assertEquals(caRoot.counter, 4);  
  +    root.log(Level.WARN, MSG); assertEquals(caRoot.counter, 4);  
       root.error(MSG); assertEquals(caRoot.counter, 5);  
  -    root.log(Priority.ERROR, MSG); assertEquals(caRoot.counter, 6);  
  +    root.log(Level.ERROR, MSG); assertEquals(caRoot.counter, 6);  
   
       h.disableAll();
       root.debug(MSG); assertEquals(caRoot.counter, 6);  
       root.info(MSG); assertEquals(caRoot.counter, 6);  
  -    root.log(Priority.WARN, MSG); assertEquals(caRoot.counter, 6);  
  +    root.log(Level.WARN, MSG); assertEquals(caRoot.counter, 6);  
       root.error(MSG); assertEquals(caRoot.counter, 6);  
  -    root.log(Priority.FATAL, MSG); assertEquals(caRoot.counter, 6);  
  -    root.log(Priority.FATAL, MSG); assertEquals(caRoot.counter, 6);  
  +    root.log(Level.FATAL, MSG); assertEquals(caRoot.counter, 6);  
  +    root.log(Level.FATAL, MSG); assertEquals(caRoot.counter, 6);  
   
  -    h.disable(Priority.FATAL);
  +    h.disable(Level.FATAL);
       root.debug(MSG); assertEquals(caRoot.counter, 6);  
       root.info(MSG); assertEquals(caRoot.counter, 6);  
  -    root.log(Priority.WARN, MSG); assertEquals(caRoot.counter, 6);  
  +    root.log(Level.WARN, MSG); assertEquals(caRoot.counter, 6);  
       root.error(MSG); assertEquals(caRoot.counter, 6);
  -    root.log(Priority.ERROR, MSG); assertEquals(caRoot.counter, 6);  
  -    root.log(Priority.FATAL, MSG); assertEquals(caRoot.counter, 6);  
  +    root.log(Level.ERROR, MSG); assertEquals(caRoot.counter, 6);  
  +    root.log(Level.FATAL, MSG); assertEquals(caRoot.counter, 6);  
     }
   
   
  @@ -312,11 +312,11 @@
   
     public
     void testHierarchy1() {
  -    Hierarchy h = new Hierarchy( new RootCategory(Priority.ERROR));
  +    Hierarchy h = new Hierarchy( new RootCategory(Level.ERROR));
       Category a0 = h.getInstance("a");
       assertEquals("a", a0.getName());
  -    assertNull(a0.getPriority());
  -    assertSame(Priority.ERROR, a0.getChainedPriority());
  +    assertNull(a0.getLevel());
  +    assertSame(Level.ERROR, a0.getChainedLevel());
   
       Category a1 = h.getInstance("a");
       assertSame(a0, a1);
  
  
  
  1.3       +23 -23    jakarta-log4j/src/java/org/apache/log4j/test/UnitTestOptionConverter.java
  
  Index: UnitTestOptionConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/UnitTestOptionConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UnitTestOptionConverter.java	2001/04/17 19:59:33	1.2
  +++ UnitTestOptionConverter.java	2001/09/02 20:05:40	1.3
  @@ -5,8 +5,8 @@
   package org.apache.log4j.test;
   
   import org.apache.log4j.helpers.OptionConverter;
  -import org.apache.log4j.Priority;
  -import org.apache.log4j.xml.examples.XPriority;
  +import org.apache.log4j.Level;
  +import org.apache.log4j.xml.examples.XLevel;
   
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  @@ -89,37 +89,37 @@
   
   
     public
  -  void toPriorityTest1() {
  +  void toLevelTest1() {
       String val = "INFO";
  -    Priority p = OptionConverter.toPriority(val, null);
  -    assertEquals(p, Priority.INFO);
  +    Level p = OptionConverter.toLevel(val, null);
  +    assertEquals(p, Level.INFO);
     }
   
     public
  -  void toPriorityTest2() {
  -    String val = "INFO#org.apache.log4j.xml.examples.XPriority";
  -    Priority p = OptionConverter.toPriority(val, null);
  -    assertEquals(p, Priority.INFO);
  +  void toLevelTest2() {
  +    String val = "INFO#org.apache.log4j.xml.examples.XLevel";
  +    Level p = OptionConverter.toLevel(val, null);
  +    assertEquals(p, Level.INFO);
     }
   
     public
  -  void toPriorityTest3() {
  -    String val = "TRACE#org.apache.log4j.xml.examples.XPriority";
  -    Priority p = OptionConverter.toPriority(val, null);    
  -    assertEquals(p, XPriority.TRACE);
  +  void toLevelTest3() {
  +    String val = "TRACE#org.apache.log4j.xml.examples.XLevel";
  +    Level p = OptionConverter.toLevel(val, null);    
  +    assertEquals(p, XLevel.TRACE);
     }
   
     public
  -  void toPriorityTest4() {
  -    String val = "TR#org.apache.log4j.xml.examples.XPriority";
  -    Priority p = OptionConverter.toPriority(val, null);    
  +  void toLevelTest4() {
  +    String val = "TR#org.apache.log4j.xml.examples.XLevel";
  +    Level p = OptionConverter.toLevel(val, null);    
       assertEquals(p, null);
     }
   
     public
  -  void toPriorityTest5() {
  +  void toLevelTest5() {
       String val = "INFO#org.apache.log4j.xml.TOTO";
  -    Priority p = OptionConverter.toPriority(val, null);    
  +    Level p = OptionConverter.toLevel(val, null);    
       assertEquals(p, null);
     }
   
  @@ -133,11 +133,11 @@
       suite.addTest(new UnitTestOptionConverter("varSubstTest3"));
       suite.addTest(new UnitTestOptionConverter("varSubstTest4"));
   
  -    suite.addTest(new UnitTestOptionConverter("toPriorityTest1"));
  -    suite.addTest(new UnitTestOptionConverter("toPriorityTest2"));
  -    suite.addTest(new UnitTestOptionConverter("toPriorityTest3"));
  -    suite.addTest(new UnitTestOptionConverter("toPriorityTest4"));
  -    suite.addTest(new UnitTestOptionConverter("toPriorityTest5"));
  +    suite.addTest(new UnitTestOptionConverter("toLevelTest1"));
  +    suite.addTest(new UnitTestOptionConverter("toLevelTest2"));
  +    suite.addTest(new UnitTestOptionConverter("toLevelTest3"));
  +    suite.addTest(new UnitTestOptionConverter("toLevelTest4"));
  +    suite.addTest(new UnitTestOptionConverter("toLevelTest5"));
       return suite;
     }
   
  
  
  
  1.5       +2 -0      jakarta-log4j/src/java/org/apache/log4j/test/witness/getOptions.1
  
  Index: getOptions.1
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/witness/getOptions.1,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- getOptions.1	2001/03/19 12:38:21	1.4
  +++ getOptions.1	2001/09/02 20:05:40	1.5
  @@ -1,4 +1,6 @@
   log4j.appender.f.Append=false
  +log4j.appender.f.BufferSize=8192
  +log4j.appender.f.BufferedIO=false
   log4j.appender.f.File=temp
   log4j.appender.f.ImmediateFlush=true
   log4j.appender.f.layout.ContentType=text/plain
  
  
  
  1.2       +18 -19    jakarta-log4j/src/java/org/apache/log4j/test/xml/ext1.xml
  
  Index: ext1.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/xml/ext1.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ext1.xml	2001/06/27 21:42:15	1.1
  +++ ext1.xml	2001/09/02 20:05:40	1.2
  @@ -2,26 +2,25 @@
   <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
   
   <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
  -                     configDebug="true">
  +                     debug="true">
   
  -	<appender name="TEMP" class="org.apache.log4j.FileAppender">
  -                <param name="Append" value="false" />
  -		<param name="File"   value="current.reg" />
  -		<layout class="org.apache.log4j.PatternLayout">
  - 		    <param name="ConversionPattern"
  -		           value="%-5p %c{2} - %m\n"/>
  -		</layout>
  + <appender name="TEMP" class="org.apache.log4j.FileAppender">
  +   <param name="Append" value="false" />
  +   <param name="File"   value="current.reg" />
  +     <layout class="org.apache.log4j.PatternLayout">
  +       <param name="ConversionPattern"
  +             value="%-5p %c{2} - %m\n"/>
  +     </layout>
   
  -		<filter class="org.apache.log4j.varia.PriorityMatchFilter">
  -                  <param name="PriorityToMatch" value="TRACE#org.apache.log4j.xml.examples.XPriority" />
  -                  <param name="AcceptOnMatch" value="true" />
  -		</filter>
  -
  -
  -	</appender>
  +   <filter class="org.apache.log4j.varia.PriorityMatchFilter">
  +     <param name="PriorityToMatch" 
  +            value="TRACE#org.apache.log4j.xml.examples.XLevel" />
  +      <param name="AcceptOnMatch" value="true" />
  +   </filter>
  +   </appender>
    
  -	<root>
  -          <appender-ref ref="TEMP" />	
  -          <priority value ="TRACE" class="org.apache.log4j.xml.examples.XPriority"/>       
  -	</root>
  +   <root>
  +     <appender-ref ref="TEMP" />	
  +       <level value ="TRACE" class="org.apache.log4j.xml.examples.XLevel"/>       
  +   </root>
   </log4j:configuration>
  
  
  
  1.7       +2 -1      jakarta-log4j/src/java/org/apache/log4j/varia/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/varia/Makefile,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile	2001/04/26 17:31:05	1.6
  +++ Makefile	2001/09/02 20:05:40	1.7
  @@ -5,8 +5,9 @@
   	  Roller.java\
   	  DenyAllFilter.java\
   	  StringMatchFilter.java\
  -	  PriorityMatchFilter.java\
  +	  LevelMatchFilter.java\
   	  PriorityRangeFilter.java\
  +	  PriorityMatchFilter.java\
   
   SUBDIRS :=test
   
  
  
  
  1.8       +15 -29    jakarta-log4j/src/java/org/apache/log4j/varia/PriorityMatchFilter.java
  
  Index: PriorityMatchFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/varia/PriorityMatchFilter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PriorityMatchFilter.java	2001/06/27 21:34:35	1.7
  +++ PriorityMatchFilter.java	2001/09/02 20:05:40	1.8
  @@ -8,18 +8,18 @@
   
   package org.apache.log4j.varia;
   
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.spi.Filter;
   import org.apache.log4j.spi.LoggingEvent;
   import org.apache.log4j.helpers.OptionConverter;
   
   /**
  -   This is a very simple filter based on priority matching.
  +   This is a very simple filter based on level matching.
   
   
  -   <p>The filter admits two options <b>PriorityToMatch</b> and
  +   <p>The filter admits two options <b>LevelToMatch</b> and
      <b>AcceptOnMatch</b>. If there is an exact match between the value
  -   of the PriorityToMatch option and the priority of the {@link
  +   of the LevelToMatch option and the level of the {@link
      LoggingEvent}, then the {@link #decide} method returns {@link
      Filter#ACCEPT} in case the <b>AcceptOnMatch</b> option value is set
      to <code>true</code>, if it is <code>false</code> then {@link
  @@ -29,10 +29,11 @@
      <p>See configuration files <a
      href="../xml/doc-files/test11.xml">test11.xml</a> and <a
      href="../xml/doc-files/test12.xml">test12.xml</a> for an example of
  -   seeting up a <code>PriorityMatchFilter</code>.
  +   seeting up a <code>LevelMatchFilter</code>.
   
      @author Ceki G&uuml;lc&uuml;
  -
  +   
  +   @deprecated Use {@link PriorityMatchFilter} instead.
      @since 0.9.1 */
   public class PriorityMatchFilter extends Filter {
     
  @@ -41,7 +42,7 @@
        This constant is not longer needed and will be removed in the
        <em>near</em> term.
      */
  -  public static final String PRIORITY_TO_MATCH_OPTION = "PriorityToMatch";
  +  public static final String LEVEL_TO_MATCH_OPTION = "PriorityToMatch";
   
     /**
        @deprecated Options are now handled using the JavaBeans paradigm.
  @@ -57,7 +58,7 @@
   
     /**
      */
  -  Priority priorityToMatch;
  +  Level levelToMatch;
   
     /**
        @deprecated We now use JavaBeans introspection to configure
  @@ -65,33 +66,18 @@
     */
     public
     String[] getOptionStrings() {
  -    return new String[] {PRIORITY_TO_MATCH_OPTION, ACCEPT_ON_MATCH_OPTION};
  +    return new String[] {LEVEL_TO_MATCH_OPTION, ACCEPT_ON_MATCH_OPTION};
     }
   
  -  /**
  -     @deprecated Use the setter method for the option directly instead
  -     of the generic <code>setOption</code> method. 
   
  -     @deprecated We now use JavaBeans introspection to configure
  -     components. 
  -  */
  -  public
  -  void setOption(String key, String value) {    
  -    if(key.equalsIgnoreCase(PRIORITY_TO_MATCH_OPTION)) {
  -      priorityToMatch = OptionConverter.toPriority(value, null);
  -    } else if (key.equalsIgnoreCase(ACCEPT_ON_MATCH_OPTION)) {
  -      acceptOnMatch = OptionConverter.toBoolean(value, acceptOnMatch);
  -    }
  -  }
  -  
     public
  -  void setPriorityToMatch(String priority) {
  -    priorityToMatch = OptionConverter.toPriority(priority, null);
  +  void setPriorityToMatch(String level) {
  +    levelToMatch = OptionConverter.toLevel(level, null);
     }
     
     public
     String getPriorityToMatch() {
  -    return priorityToMatch == null ? null : priorityToMatch.toString();
  +    return levelToMatch == null ? null : levelToMatch.toString();
     }
     
     public
  @@ -129,12 +115,12 @@
       </table> */
     public
     int decide(LoggingEvent event) {
  -    if(this.priorityToMatch == null) {
  +    if(this.levelToMatch == null) {
         return Filter.NEUTRAL;
       }
       
       boolean matchOccured = false;
  -    if(this.priorityToMatch == event.priority) {
  +    if(this.levelToMatch == event.level) {
         matchOccured = true;
       }
   
  
  
  
  1.2       +11 -11    jakarta-log4j/src/java/org/apache/log4j/varia/PriorityRangeFilter.java
  
  Index: PriorityRangeFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/varia/PriorityRangeFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PriorityRangeFilter.java	2001/04/26 17:31:05	1.1
  +++ PriorityRangeFilter.java	2001/09/02 20:05:40	1.2
  @@ -8,7 +8,7 @@
   
   package org.apache.log4j.varia;
   
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.spi.Filter;
   import org.apache.log4j.spi.LoggingEvent;
   import org.apache.log4j.helpers.LogLog;
  @@ -50,8 +50,8 @@
        <code>false</code>, so that later filters get run by default  */
     boolean acceptOnMatch = false;
   
  -  Priority priorityMin;
  -  Priority priorityMax;
  +  Level priorityMin;
  +  Level priorityMax;
   
    
     /**
  @@ -60,14 +60,14 @@
     public
     int decide(LoggingEvent event) {
       if(this.priorityMin != null) {
  -      if (event.priority.isGreaterOrEqual(priorityMin) == false) {
  +      if (event.level.isGreaterOrEqual(priorityMin) == false) {
           // priority of event is less than minimum
           return Filter.DENY;
         }
       }
   
       if(this.priorityMax != null) {
  -      if (event.priority.toInt() > priorityMax.toInt()) {
  +      if (event.level.toInt() > priorityMax.toInt()) {
           // priority of event is greater than maximum
           // Alas, there is no Priority.isGreater method. and using
           // a combo of isGreaterOrEqual && !Equal seems worse than
  @@ -90,7 +90,7 @@
    /**
        Get the value of the <code>PriorityMax</code> option.  */
     public
  -  Priority getPriorityMax() {
  +  Level getPriorityMax() {
       return priorityMax;
     }
   
  @@ -98,7 +98,7 @@
     /**
        Get the value of the <code>PriorityMin</code> option.  */
     public
  -  Priority getPriorityMin() {
  +  Level getPriorityMin() {
       return priorityMin;
     }
   
  @@ -114,7 +114,7 @@
        Set the <code>PriorityMax</code> option.
      */
     public
  -  void setPriorityMax(Priority priorityMax) {
  +  void setPriorityMax(Level priorityMax) {
       this.priorityMax =  priorityMax;
     }
   
  @@ -122,7 +122,7 @@
        Set the <code>PriorityMin</code> option.
      */
     public
  -  void setPriorityMin(Priority priorityMin) {
  +  void setPriorityMin(Level priorityMin) {
       this.priorityMin =  priorityMin;
     }
   
  @@ -154,10 +154,10 @@
     public
     void setOption(String key, String value) {
       if(key.equalsIgnoreCase(PRIORITY_MIN_OPTION)) {
  -      priorityMin = OptionConverter.toPriority(value, null);
  +      priorityMin = OptionConverter.toLevel(value, null);
       }
       else if (key.equalsIgnoreCase(PRIORITY_MAX_OPTION)) {
  -      priorityMax = OptionConverter.toPriority(value, null);
  +      priorityMax = OptionConverter.toLevel(value, null);
       }
       else if (key.equalsIgnoreCase(ACCEPT_ON_MATCH_OPTION)) {
         acceptOnMatch = OptionConverter.toBoolean(value, acceptOnMatch);
  
  
  
  1.29      +16 -16    jakarta-log4j/src/java/org/apache/log4j/xml/DOMConfigurator.java
  
  Index: DOMConfigurator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/DOMConfigurator.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- DOMConfigurator.java	2001/08/14 18:39:12	1.28
  +++ DOMConfigurator.java	2001/09/02 20:05:40	1.29
  @@ -21,7 +21,7 @@
   import org.apache.log4j.spi.CategoryFactory;
   import org.apache.log4j.Appender;
   import org.apache.log4j.Layout;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.Hierarchy;
   import org.apache.log4j.BasicConfigurator;
   import org.apache.log4j.spi.Filter;
  @@ -82,7 +82,7 @@
     static final String CLASS_ATTR        = "class";
     static final String VALUE_ATTR	= "value";
     static final String ROOT_TAG		= "root";
  -  static final String PRIORITY_TAG	= "priority";
  +  static final String LEVEL_TAG	= "level";
     static final String FILTER_TAG	= "filter";
     static final String ERROR_HANDLER_TAG	= "errorHandler";
     static final String REF_ATTR		= "ref";
  @@ -410,8 +410,8 @@
   	    
   	  cat.addAppender(appender);
   	  
  -	} else if(tagName.equals(PRIORITY_TAG)) {
  -	  parsePriority(currentElement, cat, isRoot);	
  +	} else if(tagName.equals(LEVEL_TAG)) {
  +	  parseLevel(currentElement, cat, isRoot);	
   	} else if(tagName.equals(PARAM_TAG)) {
             setParameter(currentElement, propSetter);
   	}
  @@ -464,46 +464,46 @@
     }
   
     /**
  -     Used internally to parse a priority  element.
  +     Used internally to parse a level  element.
     */
     protected
  -  void parsePriority(Element element, Category cat, boolean isRoot) {
  +  void parseLevel(Element element, Category cat, boolean isRoot) {
       String catName = cat.getName();
       if(isRoot) {
         catName = "root";
       }
   
       String priStr = subst(element.getAttribute(VALUE_ATTR));
  -    LogLog.debug("Priority value for "+catName+" is  ["+priStr+"].");
  +    LogLog.debug("Level value for "+catName+" is  ["+priStr+"].");
       
       if(BasicConfigurator.INHERITED.equals(priStr)) {
         if(isRoot) {
  -	LogLog.error("Root priority cannot be inherited. Ignoring directive.");
  +	LogLog.error("Root level cannot be inherited. Ignoring directive.");
         } else {
  -	cat.setPriority(null);
  +	cat.setLevel(null);
         }
       } else {
         String className = subst(element.getAttribute(CLASS_ATTR));      
         if(EMPTY_STR.equals(className)) {      
   	
  -	cat.setPriority(Priority.toPriority(priStr));
  +	cat.setLevel(Level.toLevel(priStr));
         } else {
  -	LogLog.debug("Desired Priority sub-class: ["+className+']');
  +	LogLog.debug("Desired Level sub-class: ["+className+']');
   	try {	 
   	  Class clazz = Loader.loadClass(className);
  -	  Method toPriorityMethod = clazz.getMethod("toPriority", 
  +	  Method toLevelMethod = clazz.getMethod("toLevel", 
   						    ONE_STRING_PARAM);
  -	  Priority pri = (Priority) toPriorityMethod.invoke(null, 
  +	  Level pri = (Level) toLevelMethod.invoke(null, 
   						    new Object[] {priStr});
  -	  cat.setPriority(pri);
  +	  cat.setLevel(pri);
   	} catch (Exception oops) {
  -	  LogLog.error("Could not create priority ["+priStr+
  +	  LogLog.error("Could not create level ["+priStr+
   		       "]. Reported error follows.", oops);
   	  return;
   	}
         }
       }
  -    LogLog.debug(catName + " priority set to " + cat.getPriority());    
  +    LogLog.debug(catName + " level set to " + cat.getLevel());    
     }
   
     protected
  
  
  
  1.14      +2 -2      jakarta-log4j/src/java/org/apache/log4j/xml/XMLLayout.java
  
  Index: XMLLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/XMLLayout.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XMLLayout.java	2001/07/26 11:16:49	1.13
  +++ XMLLayout.java	2001/09/02 20:05:40	1.14
  @@ -143,8 +143,8 @@
       buf.append(event.categoryName);
       buf.append("\" timestamp=\"");
       buf.append(event.timeStamp);
  -    buf.append("\" priority=\"");
  -    buf.append(event.priority);
  +    buf.append("\" level=\"");
  +    buf.append(event.level);
       buf.append("\" thread=\"");
       buf.append(event.getThreadName());
       buf.append("\">\r\n");
  
  
  
  1.4       +1 -1      jakarta-log4j/src/java/org/apache/log4j/xml/examples/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/examples/Makefile,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile	2001/03/21 21:34:30	1.3
  +++ Makefile	2001/09/02 20:05:40	1.4
  @@ -1,7 +1,7 @@
   
   PKG_DIR :=org/apache/log4j/xml/examples
   DEPTH   :=../../../../../../..
  -JSOURCES:=ReportParserError.java XMLSample.java XPriority.java\
  +JSOURCES:=ReportParserError.java XMLSample.java XLevel.java\
   	XCategory.java XTest.java 
   
   
  
  
  
  1.14      +19 -19    jakarta-log4j/src/java/org/apache/log4j/xml/examples/XCategory.java
  
  Index: XCategory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/examples/XCategory.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XCategory.java	2001/06/27 16:02:43	1.13
  +++ XCategory.java	2001/09/02 20:05:40	1.14
  @@ -9,13 +9,13 @@
   
   
   import org.apache.log4j.Category;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import org.apache.log4j.spi.OptionHandler;
   import org.apache.log4j.spi.LoggingEvent;
   import org.apache.log4j.spi.CategoryFactory;
   import org.apache.log4j.helpers.LogLog;
   
  -import org.apache.log4j.xml.examples.XPriority;
  +import org.apache.log4j.xml.examples.XLevel;
   
   /**
      A simple example showing Category sub-classing. It shows the
  @@ -67,7 +67,7 @@
     */
     public 
     void debug(String message) {
  -    super.log(FQCN, Priority.DEBUG, message + " " + suffix, null);
  +    super.log(FQCN, Level.DEBUG, message + " " + suffix, null);
     }
   
   
  @@ -105,24 +105,24 @@
   
     /**
        We introduce a new printing method in order to support {@link
  -     XPriority#LETHAL}.  */
  +     XLevel#LETHAL}.  */
     public
     void lethal(String message, Throwable t) { 
  -    if(hierarchy.isDisabled(XPriority.LETHAL_INT)) 
  +    if(hierarchy.isDisabled(XLevel.LETHAL_INT)) 
         return;
  -    if(XPriority.LETHAL.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, XPriority.LETHAL, message, t);
  +    if(XLevel.LETHAL.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, XLevel.LETHAL, message, t);
     }
   
     /**
        We introduce a new printing method in order to support {@link
  -     XPriority#LETHAL}.  */
  +     XLevel#LETHAL}.  */
     public
     void lethal(String message) { 
  -    if(hierarchy.isDisabled(XPriority.LETHAL_INT)) 
  +    if(hierarchy.isDisabled(XLevel.LETHAL_INT)) 
         return;
  -    if(XPriority.LETHAL.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, XPriority.LETHAL, message, null);
  +    if(XLevel.LETHAL.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, XLevel.LETHAL, message, null);
     }
   
   
  @@ -152,25 +152,25 @@
     }
   
     /**
  -     We introduce a new printing method that takes the TRACE priority.
  +     We introduce a new printing method that takes the TRACE level.
     */
     public
     void trace(String message, Throwable t) { 
  -    if(hierarchy.isDisabled(XPriority.TRACE_INT))
  +    if(hierarchy.isDisabled(XLevel.TRACE_INT))
         return;   
  -    if(XPriority.TRACE.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, XPriority.TRACE, message, t);
  +    if(XLevel.TRACE.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, XLevel.TRACE, message, t);
     }
   
     /**
  -     We introduce a new printing method that takes the TRACE priority.
  +     We introduce a new printing method that takes the TRACE level.
     */
     public
     void trace(String message) { 
  -    if(hierarchy.isDisabled(XPriority.TRACE_INT))
  +    if(hierarchy.isDisabled(XLevel.TRACE_INT))
         return;   
  -    if(XPriority.TRACE.isGreaterOrEqual(this.getChainedPriority()))
  -      forcedLog(FQCN, XPriority.TRACE, message, null);
  +    if(XLevel.TRACE.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, XLevel.TRACE, message, null);
     }
   
   
  
  
  
  1.4       +1 -1      jakarta-log4j/src/java/org/apache/log4j/xml/examples/XTest.java
  
  Index: XTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/examples/XTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XTest.java	2000/12/20 15:57:30	1.3
  +++ XTest.java	2001/09/02 20:05:40	1.4
  @@ -3,7 +3,7 @@
   
   import org.apache.log4j.xml.DOMConfigurator;
   import org.apache.log4j.Category;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   import java.net.*;
   
   /**
  
  
  
  1.2       +4 -4      jakarta-log4j/src/java/org/apache/log4j/xml/test/XTest.java
  
  Index: XTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/test/XTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XTest.java	2001/07/30 20:32:49	1.1
  +++ XTest.java	2001/09/02 20:05:40	1.2
  @@ -9,9 +9,9 @@
   
   import org.apache.log4j.xml.DOMConfigurator;
   import org.apache.log4j.Category;
  -import org.apache.log4j.Priority;
  +import org.apache.log4j.Level;
   
  -import org.apache.log4j.xml.examples.XPriority;
  +import org.apache.log4j.xml.examples.XLevel;
   import org.apache.log4j.xml.examples.XCategory;
   
   
  @@ -69,8 +69,8 @@
       cat.error("Message " + ++i);
       root.error("Message " + i);
       
  -    cat.log(Priority.FATAL, "Message " + ++i);
  -    root.log(Priority.FATAL, "Message " + i);    
  +    cat.log(Level.FATAL, "Message " + ++i);
  +    root.log(Level.FATAL, "Message " + i);    
       
       Exception e = new Exception("Just testing");
       cat.debug("Message " + ++i, e);
  
  
  

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