You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by pr...@apache.org on 2004/09/27 18:21:40 UTC

cvs commit: jakarta-commons/logging RELEASE-NOTES.txt

proyal      2004/09/27 09:21:40

  Modified:    logging/src/java/org/apache/commons/logging/impl
                        AvalonLogger.java
               logging  RELEASE-NOTES.txt
  Log:
  Avalon Logger was broken by Serialization changes 13 months ago. Fixing and made not Serializable
  since it cannot be Serializable if a Logger is explicitly passed in.
  
  Revision  Changes    Path
  1.10      +4 -11     jakarta-commons/logging/src/java/org/apache/commons/logging/impl/AvalonLogger.java
  
  Index: AvalonLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/AvalonLogger.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AvalonLogger.java	1 Jun 2004 19:56:20 -0000	1.9
  +++ AvalonLogger.java	27 Sep 2004 16:21:40 -0000	1.10
  @@ -16,7 +16,6 @@
   
   package org.apache.commons.logging.impl;
   
  -import java.io.Serializable;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.commons.logging.Log;
   
  @@ -43,14 +42,12 @@
    * @author <a href="mailto:neeme@apache.org">Neeme Praks</a>
    * @version $Revision$ $Date$
    */
  -public class AvalonLogger implements Log, Serializable {
  +public class AvalonLogger implements Log {
   
       /** Ancesteral avalon logger  */ 
       private static Logger defaultLogger = null;
       /** Avalon logger used to perform log */
       private transient Logger logger = null;
  -    /** The name of this logger */
  -    private String name = null;
   
       /**
        * Constructs an <code>AvalonLogger</code> that outputs to the given
  @@ -58,7 +55,6 @@
        * @param logger the avalon logger implementation to delegate to
        */
       public AvalonLogger(Logger logger) {
  -        this.name = name;
           this.logger = logger;
       }
   
  @@ -70,17 +66,14 @@
       public AvalonLogger(String name) {
           if (defaultLogger == null)
               throw new NullPointerException("default logger has to be specified if this constructor is used!");
  -        this.logger = getLogger();
  +        this.logger = defaultLogger.getChildLogger(name);
       }
   
       /**
        * Gets the Avalon logger implementation used to perform logging.
        * @return avalon logger implementation
        */
  -    public Logger getLogger() {
  -        if (logger == null) {
  -            logger = defaultLogger.getChildLogger(name);
  -        }
  +    private final Logger getLogger() {
           return logger;
       }
   
  
  
  
  1.8       +4 -2      jakarta-commons/logging/RELEASE-NOTES.txt
  
  Index: RELEASE-NOTES.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/RELEASE-NOTES.txt,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RELEASE-NOTES.txt	1 Jun 2004 20:39:50 -0000	1.7
  +++ RELEASE-NOTES.txt	27 Sep 2004 16:21:40 -0000	1.8
  @@ -52,7 +52,7 @@
   [AvalonLogger]     Added AvalonLogger, which wraps the logger used by the
                      Avalon framework.  As with other implementations, this
                      is compiled only if the appropriate dependencies are
  -                   satisfied.
  +                   satisfied. This implementation is *NOT* Serializable
   
   [Jdk13LumberjackLogger]
                      Added Jdk13LumberjackLogger, which wraps the implementation
  @@ -104,6 +104,8 @@
                      exceptions when looking up system properties that are
                      not accessible.
   
  +[AvalonLogger]     Fix NullPointerException when it when providing a
  +                   default logger.
   
   
   DEPRECATIONS:
  
  
  

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