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/24 23:41:25 UTC

cvs commit: jakarta-log4j/org/apache/log4j/spi RootCategory.java

ceki        01/01/24 14:41:25

  Modified:    .        build.inc
               org/apache/log4j TTCCLayout.java
               org/apache/log4j/helpers BoundedFIFO.java
               org/apache/log4j/spi RootCategory.java
  Log:
  Made corrections as suggested by the carefull eye of Mathias Bogaert.
  
  Revision  Changes    Path
  1.14      +1 -1      jakarta-log4j/build.inc
  
  Index: build.inc
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/build.inc,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- build.inc	2001/01/24 16:15:22	1.13
  +++ build.inc	2001/01/24 22:41:23	1.14
  @@ -68,7 +68,7 @@
       <echo message="JAVAMAIL is present."/>
     </target>
   
  -  <!--    <property name="build.compiler" value="jikes"/>	-->
  +
   
     <target name="init">
       <tstamp />
  
  
  
  1.5       +9 -10     jakarta-log4j/org/apache/log4j/TTCCLayout.java
  
  Index: TTCCLayout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/TTCCLayout.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TTCCLayout.java	2001/01/22 10:57:26	1.4
  +++ TTCCLayout.java	2001/01/24 22:41:24	1.5
  @@ -5,8 +5,9 @@
   
   //      See the LICENCE file for the terms of distribution.
   
  -// Contributors: "Christopher Williams" <Ch...@mail.northgrum.com>
  -
  +// Contributors: Christopher Williams 
  +//               Mathias Bogaert
  +       
   package org.apache.log4j;
   
   import org.apache.log4j.Priority;
  @@ -213,12 +214,11 @@
     }
   
     /**
  -     Provides an alternate mehtod to setting the
  +     Provides an alternate method to set the
        <code>CategoryPrefixing</code> option. Preferred method to set
        options is through a configuration file.
   
  -     <p>See also {@link PropertyConfigurator}.
  -  */
  +     <p>See also {@link PropertyConfigurator}.  */
     public
     void setCategoryPrefixing(boolean categoryPrefixing) {
       this.categoryPrefixing = categoryPrefixing;    
  @@ -227,12 +227,11 @@
     
   
     /**
  -     Provides an alternate mehtod to setting the
  -     <code>ThreadPrinting</code> option. Preferred method to set options
  -     is through the configuration file.
  +     Provides an alternate method to set the
  +     <code>ThreadPrinting</code> option. Preferred method to set
  +     options is through the configuration file.
   
  -     <p>Seel also {@link PropertyConfigurator}
  -  */
  +     <p>Seel also {@link PropertyConfigurator} */
     public
     void setThreadPrinting(boolean threadPrinting) {
       this.threadPrinting = threadPrinting;    
  
  
  
  1.4       +12 -3     jakarta-log4j/org/apache/log4j/helpers/BoundedFIFO.java
  
  Index: BoundedFIFO.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/helpers/BoundedFIFO.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BoundedFIFO.java	2001/01/23 22:07:39	1.3
  +++ BoundedFIFO.java	2001/01/24 22:41:24	1.4
  @@ -6,6 +6,8 @@
    * the LICENSE.APL file.
    */
   
  +// Contributors:     Mathias Bogaert
  +
   package org.apache.log4j.helpers;
   
   import org.apache.log4j.spi.LoggingEvent;
  @@ -99,6 +101,13 @@
       return a < b ? a : b;
     }
   
  +
  +  /**
  +     Resize the buffer to a new size. If the new size is smaller than
  +     the old size events might be lost.
  +     
  +     @since 1.1
  +   */
     synchronized
     public 
     void resize(int newSize) {
  @@ -121,7 +130,7 @@
      // Copy from buf starting a first, to tmp, starting at position 0, len1 elements.
      System.arraycopy(buf, first, tmp, 0, len1);
      
  -   // Are there remain uncopied elements and there is still space in the new array?
  +   // Are there any uncopied elements and is there still space in the new array?
      int len2 = 0;
      if((len1 < numElements) && (len1 < newSize)) {
        len2 = numElements - len1;
  @@ -134,7 +143,7 @@
      this.first=0;   
      this.numElements = len1+len2;
      this.next = this.numElements;
  -   if(this.next == this.maxSize) 
  +   if(this.next == this.maxSize) // this should never happen, but again, it just might.
        this.next = 0;
     }
   
  @@ -149,7 +158,7 @@
     }
   
     /**
  -      Returns <code>true</code> if there the number of elements in the
  +      Returns <code>true</code> if the number of elements in the
         buffer plus 1 equals the maximum buffer size, returns
         <code>false</code> otherwise. */
     public
  
  
  
  1.4       +3 -3      jakarta-log4j/org/apache/log4j/spi/RootCategory.java
  
  Index: RootCategory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/spi/RootCategory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RootCategory.java	2001/01/24 10:24:10	1.3
  +++ RootCategory.java	2001/01/24 22:41:25	1.4
  @@ -11,6 +11,7 @@
   import  org.apache.log4j.Priority;
   import  org.apache.log4j.helpers.LogLog;
   
  +// Contibutors: Mathias Bogaert
   
   /**
      RootCategory sits at the top of the category hierachy. It is a
  @@ -35,7 +36,7 @@
     public
     RootCategory(Priority priority) {
       super("root", FQCN);
  -    this.priority = priority;
  +    setPriority(priority);
     }
   
     
  @@ -50,7 +51,7 @@
     }
   
     /**
  -     Setting a null value to the root category may have catastrophic
  +     Setting a null value to the priority of the root category may have catastrophic
        results. We prevent this here.
   
        @since 0.8.3 */
  @@ -65,5 +66,4 @@
         this.priority = priority;
       }
     }
  -
   }