ceki        01/10/22 16:08:59

  Modified:    docs     HISTORY critique.html
               src/java/org/apache/log4j Level.java Logger.java
                        Priority.java
  Log:
  Added support for the FINE level as an alias for DEBUG.
  
  Revision  Changes    Path
  1.71      +3 -0      jakarta-log4j/docs/HISTORY
  
  Index: HISTORY
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/HISTORY,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- HISTORY   2001/10/17 06:37:29     1.70
  +++ HISTORY   2001/10/22 23:08:59     1.71
  @@ -14,6 +14,9 @@
        
    - Log4j is now configurable using JMX. [*]
   
  + - Added the FINE level as an alias for the DEBUG level to make migration
  +   from log4j to j.u.l. and vice versa easier. [*]
  +
    - Modified SMTPAppender to allow multiple email sessions. Thanks to
      Jon Skeet for supplying the relevant patch. [*]
   
  
  
  
  1.25      +24 -2     jakarta-log4j/docs/critique.html
  
  Index: critique.html
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/docs/critique.html,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- critique.html     2001/08/13 15:12:10     1.24
  +++ critique.html     2001/10/22 23:08:59     1.25
  @@ -305,7 +305,7 @@
   the issue.
   
   <p><b>Please direct your polite and personalized request to <a
  -href="mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]</a>
  +href="mailto:[EMAIL PROTECTED] ">[EMAIL PROTECTED]</a>
   with Bcc: to <a href="mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]</a>.</b>
   
   <p>By the way, e-mail to <code>[EMAIL PROTECTED]</code>
  @@ -533,11 +533,33 @@
   <li><p><a href="pub-support/RogerThomas.html">Roger Thomas</a> <!-- -->
   <li><p><a href="pub-support/SohailAhmed.html">Sohail Ahmed</a> <!-- -->
   <li><p><a href="pub-support/AndrewBaptist.html">Andrew Baptist</a> <!-- -->
  +<li><p><a href="pub-support/MichaelWeissenbacher.html">Michael Weissenbacher</a> 
  +<li><p><a href="pub-support/RobertPrince.html">Robert Prince</a> <!-- -->
  +<li><p><a href="pub-support/SarathChandra.html">Sarath Chandra</a> 
  +<li><p><a href="pub-support/NickXidis.html">Nick Xidis</a>  
  +<li><p><a href="pub-support/GeraldNazareth.html">Gerald Nazareth</a> 
  +<li><p><a href="pub-support/JohnCocula.html">John W. Cocula</a> <!-- -->
  +<li><p><a href="pub-support/KanedaK.html">Kaneda K</a> 
  +<li><p><a href="pub-support/GordonReynolds.html">GordonReynolds</a> 
  +<li><p><a href="pub-support/NikoSchwarz.html">Niko Schwarz</a> 
  +<li><p><a href="pub-support/AnthonyChater.html">Anthony Chater</a> 
  +<li><p><a href="pub-support/RyanKrueger.html">Ryan Krueger</a> <!-- -->
  +<li><p><a href="pub-support/LucPeerdeman.html">Luc Peerdeman</a> 
  +<li><p><a href="pub-support/CasperNielsen.html">Casper Nielsen</a> 
  +<li><p><a href="pub-support/PrakashSridharan.html">Prakash Sridharan</a> 
  +<li><p><a href="pub-support/MichaelChermside.html">Michael Chermside</a> 
  +<li><p><a href="pub-support/EdoardoComar.html">Edoardo Comar</a> 
  +<li><p><a href="pub-support/LeonardReinhart.html">Leonard Reinhart </a> 
   
  - 
  +
  +
   <!--
   
   
  +<li><p><a href="pub-support/.html"></a> 
  +<li><p><a href="pub-support/.html"></a> 
  +<li><p><a href="pub-support/.html"></a> 
  +<li><p><a href="pub-support/.html"></a> 
   <li><p><a href="pub-support/.html"></a> 
   <li><p><a href="pub-support/.html"></a> 
   <li><p><a href="pub-support/.html"></a> 
  
  
  
  1.3       +1 -3      jakarta-log4j/src/java/org/apache/log4j/Level.java
  
  Index: Level.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Level.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Level.java        2001/09/04 18:44:47     1.2
  +++ Level.java        2001/10/22 23:08:59     1.3
  @@ -88,6 +88,7 @@
   
       if(s.equals("ALL")) return Level.ALL; 
       if(s.equals("DEBUG")) return Level.DEBUG; 
  +    if(s.equals("FINE")) return Level.FINE; 
       if(s.equals("INFO"))  return Level.INFO;
       if(s.equals("WARN"))  return Level.WARN;  
       if(s.equals("ERROR")) return Level.ERROR;
  @@ -95,7 +96,4 @@
       if(s.equals("OFF")) return Level.OFF;
       return defaultLevel;
     }
  -
  -
  -  
   }
  
  
  
  1.7       +52 -0     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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Logger.java       2001/10/01 21:16:37     1.6
  +++ Logger.java       2001/10/22 23:08:59     1.7
  @@ -38,9 +38,61 @@
     @author Ceki G&uuml;lc&uuml; */
   public class Logger extends Category {
   
  +  /**
  +     The fully qualified name of the Level class. See also the 
  +     getFQCN method. */
  +  private static final String FQCN = Level.class.getName();
  +
  +
     protected 
     Logger(String name) {
       super(name);
  +  }
  +
  +  /** 
  +    Log a message object with the {@link Level#FINE FINE} level which
  +    is just an alias for the {@link Level#DEBUG DEBUG} level.
  +
  +    <p>This method first checks if this category is <code>DEBUG</code>
  +    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
  +    registered appenders in this category and also higher in the
  +    hierarchy depending on the value of the additivity flag.
  +
  +    <p><b>WARNING</b> Note that passing a {@link Throwable} to this
  +    method will print the name of the <code>Throwable</code> but no
  +    stack trace. To print a stack trace use the {@link #debug(Object,
  +    Throwable)} form instead.
  +    
  +    @param message the message object to log. */
  +  public
  +  void fine(Object message) {
  +    if(repository.isDisabled(Level.DEBUG_INT)) 
  +      return;    
  +    if(Level.DEBUG.isGreaterOrEqual(this.getChainedLevel())) {
  +      forcedLog(FQCN, Level.DEBUG, message, null);
  +    }
  +  }
  +  
  +
  +  /**  
  +   Log a message object with the <code>FINE</code> level including
  +   the stack trace of the {@link Throwable} <code>t</code> passed as
  +   parameter.
  +   
  +   <p>See {@link #fine(Object)} form for more detailed information.
  +   
  +   @param message the message object to log.
  +   @param t the exception to log, including its stack trace.  */  
  +  public
  +  void fine(Object message, Throwable t) {
  +    if(repository.isDisabled(Level.DEBUG_INT)) 
  +      return;
  +    if(Level.DEBUG.isGreaterOrEqual(this.getChainedLevel()))
  +      forcedLog(FQCN, Level.FINE, message, t);    
     }
   
     /**
  
  
  
  1.17      +20 -10    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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Priority.java     2001/09/28 13:37:48     1.16
  +++ Priority.java     2001/10/22 23:08:59     1.17
  @@ -27,6 +27,7 @@
     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 FINE_INT = DEBUG_INT;
     public final static int ALL_INT = Integer.MIN_VALUE;
   
   
  @@ -37,28 +38,34 @@
   
   
     /**
  -     The <code>FATAL</code> priority designates very severe error
  +     The <code>FATAL</code> level designates very severe error
        events that will presumably lead the application to abort.
      */
     final static public Level FATAL = new Level(FATAL_INT, "FATAL", 0);
   
     /**
  -     The <code>ERROR</code> priority designates error events that
  +     The <code>ERROR</code> level designates error events that
        might still allow the application to continue running.  */
     final static public Level ERROR = new Level(ERROR_INT, "ERROR", 3);
   
     /**
  -     The <code>WARN</code> priority designates potentially harmful situations.
  +     The <code>WARN</code> level designates potentially harmful situations.
     */
     final static public Level WARN  = new Level(WARN_INT, "WARN",  4);
   
     /**
  -     The <code>INFO</code> priority designates informational messages
  +     The <code>INFO</code> level designates informational messages
        that highlight the progress of the application at coarse-grained
        level.  */
     final static public Level INFO  = new Level(INFO_INT, "INFO",  6);
   
     /**
  +     The <code>FINE</code> level is an alias for the
  +     <code>DEBUG</code> level.  */
  +  final static public Level FINE = new Level(FINE_INT, "FINE", 7);
  +
  +
  +  /**
        The <code>DEBUG</code> priority designates fine-grained
        informational events that are most useful to debug an
        application.  */
  @@ -71,7 +78,7 @@
   
     
     /**
  -     Instantiate a priority object.
  +     Instantiate a level object.
      */
     protected
     Priority(int level, String levelStr, int syslogEquivalent) {
  @@ -100,7 +107,7 @@
     }
   
     /**
  -     Returns the integer representation of this priority.
  +     Returns the integer representation of this level.
      */
     public
     final
  @@ -110,8 +117,8 @@
   
       
     /**
  -     Returns <code>true</code> if this priority has a higher or equal
  -     priority than the priority passed as argument, <code>false</code>
  +     Returns <code>true</code> if this level has a higher or equal
  +     level than the level passed as argument, <code>false</code>
        otherwise.  
        
        <p>You should think twice before overriding the default
  @@ -124,8 +131,11 @@
     }
   
     /**
  -     Return all possible priorities as an array of Priority objects in
  -     descending order.  */
  +     Return all possible priorities as an array of Level objects in
  +     descending order.
  +
  +     @deprecated This method will be removed with no replacement.
  +  */
     public
     static
     Priority[] getAllPossiblePriorities() {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to