avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl DefaultClassLoaderModel.java DefaultContainmentModel.java Scanner.java
Date Sat, 23 Aug 2003 17:16:36 GMT
mcconnell    2003/08/23 10:16:36

  Modified:    merlin/composition/src/java/org/apache/avalon/composition/model/impl
                        DefaultClassLoaderModel.java
                        DefaultContainmentModel.java Scanner.java
  Log:
  Updates to leverage improved log message generation.
  
  Revision  Changes    Path
  1.19      +11 -17    avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultClassLoaderModel.java
  
  Index: DefaultClassLoaderModel.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultClassLoaderModel.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DefaultClassLoaderModel.java	20 Aug 2003 11:57:13 -0000	1.18
  +++ DefaultClassLoaderModel.java	23 Aug 2003 17:16:35 -0000	1.19
  @@ -76,8 +76,9 @@
   import org.apache.avalon.composition.model.ServiceRepository;
   import org.apache.avalon.composition.model.TypeUnknownException;
   import org.apache.avalon.composition.model.ModelException;
  -import org.apache.avalon.repository.Repository;
   import org.apache.avalon.composition.util.ExceptionHelper;
  +import org.apache.avalon.composition.util.StringHelper;
  +import org.apache.avalon.repository.Repository;
   import org.apache.avalon.extension.Extension;
   import org.apache.avalon.extension.manager.ExtensionManager;
   import org.apache.avalon.extension.manager.OptionalPackage;
  @@ -185,8 +186,12 @@
           m_context = context;
           enableLogging( context.getLogger() );
           m_local = getLogger().getChildLogger( "classloader" );
  -        getLocalLogger().debug( "base: " + context.getBaseDirectory() );
  -
  +        if( getLogger().isDebugEnabled() )
  +        {
  +            getLocalLogger().debug( 
  +              "base: " + 
  +              StringHelper.toString( context.getBaseDirectory() ) );
  +        }
           File base = 
             context.getBaseDirectory();
           Repository repository = 
  @@ -218,19 +223,8 @@
    
               if( getLocalLogger().isDebugEnabled() )
               {
  -                StringBuffer buffer = new StringBuffer( "classpath: " );
  -                for( int i=0; i<m_classpath.length; i++ )
  -                {
  -                    if( i==0 )
  -                    {
  -                        buffer.append( m_classpath[i] );
  -                    }
  -                    else
  -                    {
  -                        buffer.append( ";" + m_classpath[i] );
  -                    }
  -                }
  -                getLocalLogger().debug( buffer.toString() );
  +                String str = "classpath: " + StringHelper.toString( m_classpath );
  +                getLocalLogger().debug( str );
               }
   
               m_packages = buildOptionalPackages( 
  
  
  
  1.28      +7 -4      avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
  
  Index: DefaultContainmentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DefaultContainmentModel.java	20 Aug 2003 11:57:13 -0000	1.27
  +++ DefaultContainmentModel.java	23 Aug 2003 17:16:36 -0000	1.28
  @@ -81,6 +81,7 @@
   import org.apache.avalon.composition.model.ModelSelector;
   import org.apache.avalon.composition.model.ProfileSelector;
   import org.apache.avalon.composition.model.TypeRepository;
  +import org.apache.avalon.composition.util.StringHelper;
   import org.apache.avalon.repository.Repository;
   import org.apache.avalon.repository.RepositoryException;
   import org.apache.avalon.framework.logger.Logger;
  @@ -305,8 +306,9 @@
   
           if( getLogger().isDebugEnabled() )
           {
  -            final String message = REZ.getString( "containment.add", name );
  -            getLogger().debug( message );
  +            final String message = 
  +              StringHelper.toString( REZ.getString( "containment.add", name ) );
  +            getLogger().debug(  message );
           }
   
           try
  @@ -386,7 +388,8 @@
           final Logger logger = getLogger().getChildLogger( name );
           if( getLogger().isDebugEnabled() )
           {
  -            final String message = REZ.getString( "containment.add", name );
  +            final String message = 
  +              StringHelper.toString( REZ.getString( "containment.add", name ) );
               getLogger().debug( message );
           }
   
  
  
  
  1.12      +5 -2      avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/Scanner.java
  
  Index: Scanner.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/Scanner.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Scanner.java	18 Jul 2003 08:27:36 -0000	1.11
  +++ Scanner.java	23 Aug 2003 17:16:36 -0000	1.12
  @@ -77,6 +77,7 @@
   import org.apache.avalon.composition.data.Profile;
   import org.apache.avalon.composition.data.ProfilePackage;
   import org.apache.avalon.composition.data.builder.ProfilePackageBuilder;
  +import org.apache.avalon.composition.util.StringHelper;
   import org.apache.avalon.meta.info.Service;
   import org.apache.avalon.meta.info.ServiceDescriptor;
   import org.apache.avalon.meta.info.ExtensionDescriptor;
  @@ -181,7 +182,9 @@
           if( getLogger().isDebugEnabled() )
           {
               final String message =
  -              REZ.getString( "scanner.scanning", url.toString() );
  +              REZ.getString( 
  +                "scanner.scanning", 
  +                StringHelper.toString( url.toString() ) );
               getLogger().debug( message );
           }
   
  
  
  

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


Mime
View raw message