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/merlin/registry ProfileRegistry.java Registry.java
Date Tue, 09 Jul 2002 11:00:43 GMT
mcconnell    2002/07/09 04:00:43

  Modified:    assembly/src/etc kernel.xml project.mf
               assembly/src/java/org/apache/excalibur/merlin/registry
                        ProfileRegistry.java Registry.java
  Log:
  enhanced logging support
  
  Revision  Changes    Path
  1.6       +10 -5     jakarta-avalon-excalibur/assembly/src/etc/kernel.xml
  
  Index: kernel.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/etc/kernel.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- kernel.xml	8 Jul 2002 09:57:36 -0000	1.5
  +++ kernel.xml	9 Jul 2002 11:00:42 -0000	1.6
  @@ -5,11 +5,16 @@
   
   <kernel>
   
  -   <!--
  -   Declaration of the logging hierachy and constraints.
  -   -->
  -   
  -   <logger priority="DEBUG"/>
  +   <logging priority="INFO">
  +      <category priority="INFO"  name="kernel" />
  +      <category priority="INFO"  name="kernel.loader" />
  +      <category priority="INFO"  name="kernel.container" />
  +      <category priority="INFO"  name="kernel.container.profiles" />
  +      <category priority="INFO"  name="kernel.container.types" />
  +      <target name="kernel">
  +        <file location="kernel.log" />
  +      </target>
  +   </logging>
   
      <!--
      Declaration of installed extension directories.
  
  
  
  1.8       +3 -1      jakarta-avalon-excalibur/assembly/src/etc/project.mf
  
  Index: project.mf
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/etc/project.mf,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- project.mf	7 Jul 2002 05:16:30 -0000	1.7
  +++ project.mf	9 Jul 2002 11:00:42 -0000	1.8
  @@ -5,7 +5,9 @@
   Specification-Version: 1.0
   Implementation-Vendor: Apache Software Foundation
   Implementation-Version: 0.1
  -Class-Path: avalon-framework.jar logkit.jar excalibur-i18n-1.0.jar excalibur-configuration-1.0.jar
excalibur-extension-1.0a.jar avalon-meta.jar
  +Class-Path: avalon-framework.jar logkit.jar excalibur-logger-1.0.jar excalibur-i18n-1.0.jar

  + excalibur-configuration-1.0.jar excalibur-extension-1.0a.jar 
  + avalon-meta.jar 
   Main-Class: org.apache.excalibur.merlin.kernel.Main
   
   Name: org/apache/excalibur/merlin/kernel/DefaultContainer.class
  
  
  
  1.4       +1 -2      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/registry/ProfileRegistry.java
  
  Index: ProfileRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/registry/ProfileRegistry.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProfileRegistry.java	8 Jul 2002 09:57:36 -0000	1.3
  +++ ProfileRegistry.java	9 Jul 2002 11:00:43 -0000	1.4
  @@ -164,7 +164,6 @@
                   profile.addProvider( provider, role );
                   if( isLocalProfile( provider ) ) 
                   {
  -                    getLogger().info("LOCAL: " + profile );
                       m_map.add( provider );
                       m_installed.add( provider );
                   }
  
  
  
  1.10      +11 -9     jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/registry/Registry.java
  
  Index: Registry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/registry/Registry.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Registry.java	8 Jul 2002 09:57:36 -0000	1.9
  +++ Registry.java	9 Jul 2002 11:00:43 -0000	1.10
  @@ -259,7 +259,7 @@
               m_profiles = new ProfileRegistry( explicit, m_types, m_classloader, m_parent,
m_map );
               m_profiles.enableLogging( getLogger().getChildLogger( "profiles") );
               int n = m_profiles.prepareProfiles();
  -            getLogger().info("Profile count: " + n );
  +            getLogger().debug("Profile count: " + n );
           }
           catch( Throwable e )
           {
  @@ -313,10 +313,13 @@
               if( m_profiles.isLocalProfile( profile ) )
               {
                   final String name = profile.getName();
  -                getLogger().debug(" > " + name );
                   try
                   {
  +                    if( getLogger().isDebugEnabled() )
  +                      getLogger().debug("starting: " + name );
                       m_helper.startup( name, profile, m_provider );
  +                    if( getLogger().isInfoEnabled() )
  +                      getLogger().info("started: " + name );
                   }
                   catch( LifecycleException le )
                   {
  @@ -326,8 +329,6 @@
   
                       // need to retract all profiles dependent on this profile
                   }
  -                /*
  -                */
               }
           }
           getLogger().debug("started");
  @@ -343,14 +344,17 @@
               if( m_profiles.isLocalProfile( profile ) )
               {
                   final String name = profile.getName();
  -                getLogger().debug( " < " + name );
  +                if( getLogger().isDebugEnabled() )
  +                  getLogger().debug("stopping: " + name );
                   Object object = m_provider.getSingletonInstance( profile );
  -                if( object == null )
  +                if( object != null )
                   {
                       try
                       {
                           m_helper.shutdown( name, object );
                           m_provider.release( profile );
  +                        if( getLogger().isInfoEnabled() )
  +                          getLogger().info("stopped: " + name );
                       }
                       catch( LifecycleException le )
                       {
  @@ -359,8 +363,6 @@
                           getLogger().warn( warning, le );
                       }
                   }
  -                /*
  -                */
               }
           }
           getLogger().debug("stopped");
  
  
  

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