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/10/01 23:16:37 UTC

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

ceki        01/10/01 14:16:37

  Modified:    build    build.xml
               src/java/org/apache/log4j Hierarchy.java Logger.java
                        PropertyConfigurator.java
               src/java/org/apache/log4j/examples Sort.java SortAlgo.java
               src/java/org/apache/log4j/spi LoggerRepository.java
  Log:
  Doc changes.
  
  Revision  Changes    Path
  1.53      +0 -22     jakarta-log4j/build/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/build/build.xml,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- build.xml	2001/09/27 21:24:48	1.52
  +++ build.xml	2001/10/01 21:16:37	1.53
  @@ -246,28 +246,6 @@
   
       <mkdir dir="${javadoc.dest}" />
   
  -    <copy todir="${BSTEM}/examples/doc-files/">
  -      <fileset dir="${BSTEM}/examples/" 
  -         includes="Sort.java, SortAlgo.java, Trivial.java, MyCategory.java,
  -            MyCategoryFactory.java, mycat.good, mycat.bad, factor.html,
  -	    MyPatternLayout.java, MyPatternParser.java, sort2.lcf, sort3.lcf,
  -	    NumberCruncherClient.java, NumberCruncherServer.java, sort1.lcf,
  -	    NumberCruncher.java,  factor.lcf, sort4.lcf"/>
  -    </copy>
  -
  -    <copy todir="${BSTEM}/xml/examples/doc-files/" >
  -      <fileset dir="${BSTEM}/xml/examples/" 
  -         includes="XMLSample.java, XCategory.java, XTest.java"/>
  -    </copy>
  -
  -    <copy todir="${BSTEM}/xml/doc-files/"  >
  -      <fileset dir="${BSTEM}/xml/" includes="log4j.dtd"/>
  -      <fileset dir="${BSTEM}/xml/test/" includes="*.xml"/>
  -      <fileset dir="${BSTEM}/xml/examples/" 
  -         includes="sample*.xml, extension?.xml"/>
  -    </copy>
  -
  -
       <javadoc sourcepath="${java.source.dir}" 
              destdir="${javadoc.dest}" 
   	   packagenames="org.apache.log4j,
  
  
  
  1.37      +2 -13     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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Hierarchy.java	2001/09/28 13:37:48	1.36
  +++ Hierarchy.java	2001/10/01 21:16:37	1.37
  @@ -147,20 +147,9 @@
       }
     }
   
  - 
     /**
  -     Equivalent to calling <code>threshold(Level.ALL)</code>.
  -     
  -     By default all levels are thresholdd.
  +     The string form of {@link #setThreshold(Level)}.
     */
  -  //public
  -  //void enableAll() {
  -  //enable(Level.ALL);
  -  //}
  -
  -  /**
  -     The string form of {@link enable(Level)}.
  -   */
     public 
     void setThreshold(String levelStr) {
       Level l = Level.toLevel(levelStr, null);
  @@ -349,7 +338,7 @@
        This method will return <code>true</code> if this repository is
        disabled for <code>level</code> object passed as parameter and
        <code>false</code> otherwise. See also the {@link
  -     #threshold(org.apache.log4j.Level) threshold} emthod.  */
  +     #setThreshold(Level) threshold} emthod.  */
     public
     boolean isDisabled(int level) {    
       return thresholdInt > level;
  
  
  
  1.6       +1 -1      jakarta-log4j/src/java/org/apache/log4j/Logger.java
  
  Index: Logger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Logger.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Logger.java	2001/09/06 22:40:39	1.5
  +++ Logger.java	2001/10/01 21:16:37	1.6
  @@ -52,7 +52,6 @@
       return LogManager.getLogger(name);
     }
   
  -
     /**
        Same as calling {@link LogManager#getLogger(Class)}.
      */
  @@ -61,6 +60,7 @@
     Logger getLogger(Class clazz) {
       return LogManager.getLogger(clazz.getName());
     }
  +
   
     /**
        Same as calling {@link LogManager#getRootLogger()}.     
  
  
  
  1.45      +0 -5      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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- PropertyConfigurator.java	2001/09/28 13:37:48	1.44
  +++ PropertyConfigurator.java	2001/10/01 21:16:37	1.45
  @@ -186,11 +186,6 @@
       additivity rule</a> in the user manual for the meaning of the
       <code>additivity</code> flag.
   
  -    <p>The user can override any of the {@link
  -    Hierarchy#disable} family of methods by setting the a key
  -    "log4j.disableOverride" to <code>true</code> or any value other
  -    than false. As in <pre>log4j.disableOverride=true </pre>
  -
       <h3>ObjectRenderers</h3>
       
       You can customize the way message objects of a given type are
  
  
  
  1.4       +13 -18    jakarta-log4j/src/java/org/apache/log4j/examples/Sort.java
  
  Index: Sort.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/examples/Sort.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Sort.java	2001/01/17 09:28:56	1.3
  +++ Sort.java	2001/10/01 21:16:37	1.4
  @@ -2,7 +2,7 @@
   package org.apache.log4j.examples;
   
   import org.apache.log4j.PropertyConfigurator;
  -import org.apache.log4j.Category;
  +import org.apache.log4j.Logger;
   import org.apache.log4j.Priority;  
   
   /**
  @@ -17,21 +17,21 @@
      <p>Play around with different values in the configuration file and
      watch the changing behavior.
   
  -   <p>Example configuration files <a
  -   href="doc-files/sort1.lcf">sort1.lcf</a>, 
  -   <a href="doc-files/sort2.lcf">sort2.lcf</a>, 
  -   <a href="doc-files/sort3.lcf">sort3.lcf</a> and 
  -   <a href="doc-files/sort4.lcf">sort4.lcf</a> are supplied with the
  +   <p>Example configuration files can be found in <a
  +   href="doc-files/sort1.lcf">sort1.lcf</a>, <a
  +   href="doc-files/sort2.lcf">sort2.lcf</a>, <a
  +   href="doc-files/sort3.lcf">sort3.lcf</a> and <a
  +   href="doc-files/sort4.lcf">sort4.lcf</a> are supplied with the
      package.
      
  -   <p>If you are interested in logging performance, then have look at
  -   the {@link org.apache.log4j.performance.Logging} class.
  +   <p>If you are also interested in logging performance, then have
  +   look at the {@link org.apache.log4j.performance.Logging} class.
   
      @author Ceki G&uuml;lc&uuml; */
   
   public class Sort {
   
  -  static Category CAT = Category.getInstance(Sort.class.getName());
  +  static Logger logger = Logger.getLogger(Sort.class.getName());
     
     public static void main(String[] args) {
       if(args.length != 2) {
  @@ -47,11 +47,11 @@
         usage("Could not number format ["+args[1]+"].");
       }
   
  -    Sort.init(args[0]);
  +    PropertyConfigurator.configure(args[0]);
   
       int[] intArray = new int[arraySize];
   
  -    CAT.info("Populating an array of " + arraySize + " elements in" +
  +    logger.info("Populating an array of " + arraySize + " elements in" +
   	     " reverse order.");
       for(int i = arraySize -1 ; i >= 0; i--) {
         intArray[i] = arraySize - i - 1;
  @@ -63,9 +63,9 @@
   
       // We intentionally initilize sa2 with null.
       SortAlgo sa2 = new SortAlgo(null);
  -    CAT.info("The next log statement should be an error message.");
  +    logger.info("The next log statement should be an error message.");
       sa2.dump();  
  -    CAT.info("Exiting main method.");    
  +    logger.info("Exiting main method.");    
     }
     
     static
  @@ -76,10 +76,5 @@
         "where  configFile is a configuration file\n"+
         "      ARRAY_SIZE is a positive integer.\n");
       System.exit(1);
  -  }
  -
  -  static
  -  void init(String configFile) {
  -    PropertyConfigurator.configure(configFile);
     }
   }
  
  
  
  1.4       +3 -3      jakarta-log4j/src/java/org/apache/log4j/examples/SortAlgo.java
  
  Index: SortAlgo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/examples/SortAlgo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SortAlgo.java	2001/01/17 09:28:56	1.3
  +++ SortAlgo.java	2001/10/01 21:16:37	1.4
  @@ -50,12 +50,12 @@
   
     void dump() {    
       if(! (this.intArray instanceof int[])) {
  -      DUMP.error( "Tried to dump an uninitialized array.");
  +      DUMP.error("Tried to dump an uninitialized array.");
         return;
       }
  -    DUMP.info( "Dump of integer array:");
  +    DUMP.info("Dump of integer array:");
       for(int i = 0; i < this.intArray.length; i++) {
  -      DUMP.info( "Element [" + i + "]=" + this.intArray[i]);
  +      DUMP.info("Element [" + i + "]=" + this.intArray[i]);
       }    
     }
   
  
  
  
  1.8       +2 -3      jakarta-log4j/src/java/org/apache/log4j/spi/LoggerRepository.java
  
  Index: LoggerRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/spi/LoggerRepository.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- LoggerRepository.java	2001/09/28 13:37:48	1.7
  +++ LoggerRepository.java	2001/10/01 21:16:37	1.8
  @@ -33,9 +33,8 @@
   
     /**
        Is the repository disabled for a given level? The answer depends
  -     on the repository threhold and the <code>level</code>
  -     parameter. See also {@link #setThreshold} method.
  -  */
  +     on the repository threshold and the <code>level</code>
  +     parameter. See also {@link #setThreshold} method.  */
     boolean isDisabled(int level);
   
     /**
  
  
  

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