avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/autopublishing AutoPublisher.java
Date Fri, 02 Aug 2002 18:57:40 GMT
proyal      2002/08/02 11:57:40

  Modified:    src/java/org/apache/avalon/cornerstone/blocks/transport/autopublishing
                        AutoPublisher.java
  Log:
  Add some logging statements
  
  Revision  Changes    Path
  1.13      +10 -2     jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/autopublishing/AutoPublisher.java
  
  Index: AutoPublisher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/transport/autopublishing/AutoPublisher.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AutoPublisher.java	22 Jul 2002 15:32:25 -0000	1.12
  +++ AutoPublisher.java	2 Aug 2002 18:57:40 -0000	1.13
  @@ -11,6 +11,7 @@
   import java.util.Map;
   import java.util.Vector;
   import org.apache.avalon.framework.CascadingRuntimeException;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -27,7 +28,7 @@
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
    * @version $Revision$
    */
  -public class AutoPublisher
  +public class AutoPublisher extends AbstractLogEnabled
       implements Configurable, ApplicationListener
   {
       private String m_publisherName;
  @@ -67,6 +68,9 @@
           if( m_publications.containsKey( event.getName() ) )
           {
               m_events.add( event );
  +
  +            if( getLogger().isDebugEnabled() )
  +                getLogger().debug( "Will publish block: " + event.getName() );
           }
       }
   
  @@ -94,6 +98,8 @@
               }
               catch( PublicationException e )
               {
  +                getLogger().error( "Some problem auto-publishing", e );
  +
                   throw new CascadingRuntimeException( "Some problem auto-publishing", e
);
               }
               catch( ClassNotFoundException e )
  @@ -131,6 +137,8 @@
       public void applicationStopped()
       {
           m_events.clear();
  +
  +        if( getLogger().isDebugEnabled() ) getLogger().debug( "Cleared event list" );
       }
   
       public void applicationFailure( Exception e )
  
  
  

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


Mime
View raw message