avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: avalon-logkit/src/java/org/apache/log Hierarchy.java
Date Wed, 26 Feb 2003 08:14:39 GMT
donaldp     2003/02/26 00:14:39

  Modified:    src/java/org/apache/log Hierarchy.java
  Log:
  Readd a setLoggerListener
  
  Revision  Changes    Path
  1.29      +18 -2     avalon-logkit/src/java/org/apache/log/Hierarchy.java
  
  Index: Hierarchy.java
  ===================================================================
  RCS file: /home/cvs/avalon-logkit/src/java/org/apache/log/Hierarchy.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Hierarchy.java	26 Feb 2003 08:12:31 -0000	1.28
  +++ Hierarchy.java	26 Feb 2003 08:14:39 -0000	1.29
  @@ -205,7 +205,10 @@
        */
       public synchronized void addLoggerListener( final LoggerListener loggerListener )
       {
  -        if ( null == loggerListener ) throw new NullPointerException( "loggerListener"
);
  +        if ( null == loggerListener )
  +        {
  +            throw new NullPointerException( "loggerListener" );
  +        }
   
           if ( null == m_loggerListener )
           {
  @@ -225,12 +228,25 @@
        */
       public synchronized void removeLoggerListener( final LoggerListener loggerListener
)
       {
  -        if ( null == loggerListener ) throw new NullPointerException( "loggerListener"
);
  +        if ( null == loggerListener )
  +        {
  +            throw new NullPointerException( "loggerListener" );
  +        }
   
           if ( null != m_loggerListener && m_loggerListener == loggerListener );
           {
               m_loggerListener = null;
           }
  +    }
  +
  +    /**
  +     * Set the LoggerListener associated with hierarchy.
  +     *
  +     * @param loggerListener the LoggerListener
  +     */
  +    public synchronized void setLoggerListener( final LoggerListener loggerListener )
  +    {
  +        m_loggerListener = loggerListener;
       }
   
       /**
  
  
  

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


Mime
View raw message