avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/assembly/service DefaultServiceManager.java
Date Tue, 19 Nov 2002 12:22:03 GMT
mcconnell    2002/11/19 04:22:03

  Modified:    assembly/src/java/org/apache/excalibur/assembly/service
                        DefaultServiceManager.java
  Log:
  Enhancement to logging meessages.
  
  Revision  Changes    Path
  1.2       +16 -15    jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/assembly/service/DefaultServiceManager.java
  
  Index: DefaultServiceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/assembly/service/DefaultServiceManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultServiceManager.java	19 Nov 2002 03:14:09 -0000	1.1
  +++ DefaultServiceManager.java	19 Nov 2002 12:22:03 -0000	1.2
  @@ -127,20 +127,6 @@
       }
   
       //==============================================================
  -    // LogEnabled
  -    //==============================================================
  -
  -    /**
  -     * Setup logging for all subcomponents
  -     * @param logger the logging channel
  -     */
  -    public void enableLogging( final Logger logger )
  -    {
  -        super.enableLogging( logger );
  -        m_builder.enableLogging( logger.getChildLogger( "builder" ) );
  -    }
  -
  -    //==============================================================
       // ServiceManager
       //==============================================================
   
  @@ -220,6 +206,21 @@
               map = getServiceMap( classname, true );
           }
    
  +        if( getLogger().isDebugEnabled() )
  +        {
  +            StringBuffer buffer = new StringBuffer();
  +            buffer.append( "adding service: " + classname );
  +            buffer.append( "/" + service.getVersion() );
  +            String[] names = service.getAttributeNames();
  +            for( int i = 0; i < names.length; i++ )
  +            {
  +                String name = names[ i ];
  +                String value = service.getAttribute( name );
  +                buffer.append( "\n  attribute " + name + " = " + value );
  +            }
  +            getLogger().debug( buffer.toString() );
  +        }
  +
           map.put( version, service );
       }
   
  
  
  

--
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