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/01/30 00:34:04 UTC

cvs commit: jakarta-log4j/org/apache/log4j/helpers OnlyOnceErrorHandler.java

ceki        01/01/29 15:34:03

  Modified:    org/apache/log4j Category.java Hierarchy.java
               org/apache/log4j/helpers OnlyOnceErrorHandler.java
  Log:
  Fixed a bug in Hierarchy.shutdown that would shutdown the default hierarchy instead of "this".
  
  Fixed a typo in OnlyOnceErrorHandler.java reported by Mathias Bogaert.
  
  Revision  Changes    Path
  1.20      +2 -2      jakarta-log4j/org/apache/log4j/Category.java
  
  Index: Category.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/Category.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Category.java	2001/01/24 10:24:04	1.19
  +++ Category.java	2001/01/29 23:34:00	1.20
  @@ -150,12 +150,12 @@
        The assigned priority of this category.  The
        <code>priority</code> variable need not be assined a value in
        which case it is inherited form the hierarchy.  */
  -  protected Priority priority;
  +  volatile protected Priority priority;
   
     /**
        The parent of this category. All categories have at least one
        ancestor which is the root category. */
  -  protected Category parent;
  +  volatile protected Category parent;
   
     /**
        The fully qualified name of the class that this Category
  
  
  
  1.11      +6 -4      jakarta-log4j/org/apache/log4j/Hierarchy.java
  
  Index: Hierarchy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/Hierarchy.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Hierarchy.java	2001/01/22 22:11:26	1.10
  +++ Hierarchy.java	2001/01/29 23:34:01	1.11
  @@ -12,6 +12,7 @@
   // Contributors:
   //                Luke Blanshard <lu...@quiq.com>
   //                Mario Schomburg - IBM Global Services/Germany
  +//                Anders Kristensen
   
   package org.apache.log4j;
   
  @@ -31,9 +32,10 @@
      This class is specialized in retreiving categories by name and
      also maintaining the category hierarchy.
   
  -   <p><em>The casual user should never have to deal with this class
  +   <p><em>The casual user should not have to deal with this class
      firectly.</em> In fact, up until version 0.9.0, this class had
  -   default package access. 
  +   default package access. However, if you are in an environment where
  +   multiple applications run in the same VM, then read on.
   
      <p>The structure of the category hierachy is maintained by the
      {@link #getInstance} method. The hierrachy is such that children
  @@ -516,7 +518,7 @@
       root.closeNestedAppenders();
   
       synchronized(ht) {
  -      Enumeration cats = Category.getCurrentCategories();
  +      Enumeration cats = this.getCurrentCategories();
         while(cats.hasMoreElements()) {
   	Category c = (Category) cats.nextElement();
   	c.closeNestedAppenders();
  @@ -524,7 +526,7 @@
   
         // then, remove all appenders
         root.removeAllAppenders();
  -      cats = Category.getCurrentCategories();
  +      cats = this.getCurrentCategories();
         while(cats.hasMoreElements()) {
   	Category c = (Category) cats.nextElement();
   	c.removeAllAppenders();
  
  
  
  1.4       +2 -3      jakarta-log4j/org/apache/log4j/helpers/OnlyOnceErrorHandler.java
  
  Index: OnlyOnceErrorHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/helpers/OnlyOnceErrorHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OnlyOnceErrorHandler.java	2001/01/26 13:27:46	1.3
  +++ OnlyOnceErrorHandler.java	2001/01/29 23:34:03	1.4
  @@ -18,9 +18,8 @@
   
      <p>The error message is printed on <code>System.err</code>. 
   
  -   <p>This policy aims at a protecting an otherwise working
  -   application from being flooded with error messages when logging
  -   fails.
  +   <p>This policy aims at protecting an otherwise working application
  +   from being flooded with error messages when logging fails.
   
      @author Ceki G&uuml;lc&uuml;
      @since 0.9.0 */