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/resource DeploymentHelper.java LifecycleHelper.java
Date Thu, 12 Sep 2002 11:05:52 GMT
mcconnell    2002/09/12 04:05:52

  Modified:    assembly build.xml
               assembly/src/etc kernel.xml
               assembly/src/java/org/apache/excalibur/merlin/assembly
                        ServiceRegistry.java TypeRegistry.java
               assembly/src/java/org/apache/excalibur/merlin/resource
                        DeploymentHelper.java LifecycleHelper.java
  Log:
  Updates to logging and debug information related to services.
  
  Revision  Changes    Path
  1.62      +54 -54    jakarta-avalon-excalibur/assembly/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/build.xml,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- build.xml	12 Sep 2002 08:30:04 -0000	1.61
  +++ build.xml	12 Sep 2002 11:05:51 -0000	1.62
  @@ -123,8 +123,8 @@
         </java>
     </target>
   
  -    <!-- Compiles the source code -->
  -    <target name="compile" depends="idl,orb.update,corbaloc.update" 
  +  <!-- Compiles the source code -->
  +  <target name="compile" depends="idl,orb.update,corbaloc.update" 
          description="Compiles the source code">
   
           <mkdir dir="${build.classes}"/>
  @@ -150,11 +150,11 @@
               </fileset>
           </copy>
   
  -    </target>
  +  </target>
   
   
  -    <!-- Compiles the unit test source code -->
  -    <target name="compile-test" depends="compile, dependencies-test" 
  +  <!-- Compiles the unit test source code -->
  +  <target name="compile-test" depends="compile, dependencies-test" 
             description="Compiles the source code">
           <mkdir dir="${build.testsrc}"/>
   
  @@ -183,10 +183,10 @@
               </fileset>
           </copy>
   
  -    </target>
  +  </target>
   
  -    <!-- Copies and filters the license. Used by jar and dist -->
  -    <target name="prepare-conf">
  +  <!-- Copies and filters the license. Used by jar and dist -->
  +  <target name="prepare-conf">
           <mkdir dir="${build.conf}"/>
           <copy todir="${build.conf}" flatten="true">
               <fileset dir="../" includes="LICENSE.txt"/>
  @@ -194,10 +194,10 @@
                   <filter token="year" value="${year}"/>
               </filterset>
           </copy>
  -    </target>
  +  </target>
   
  -    <!-- Creates all the .jar file -->
  -    <target name="jar" depends="compile, prepare-conf" description="Generates the jar
files">
  +  <!-- Creates all the .jar file -->
  +  <target name="jar" depends="compile, prepare-conf" description="Generates the jar
files">
   
           <mkdir dir="${build.lib}"/>
   
  @@ -233,10 +233,10 @@
               </zipfileset>
           </jar>
   
  -    </target>
  +  </target>
   
  -    <!-- Creates all the .sar file -->
  -    <target name="sar" depends="deploy" description="Generates the sar files">
  +  <!-- Creates all the .sar file -->
  +  <target name="sar" depends="deploy" description="Generates the sar files">
   
           <mkdir dir="${build.lib}"/>
   
  @@ -256,10 +256,10 @@
               </zipfileset>
           </jar>
   
  -    </target>
  +  </target>
   
  -    <!-- Creates all the Javadocs -->
  -    <target name="javadocs" depends="compile" 
  +  <!-- Creates all the Javadocs -->
  +  <target name="javadocs" depends="compile" 
             description="Generates the javadocs" unless="skip.javadocs">
           <mkdir dir="${build.javadocs}"/>
           <javadoc packagenames="org.apache.excalibur.merlin.*"
  @@ -278,9 +278,9 @@
                       value="&quot;Copyright &#169; ${year} Apache Jakarta Project.
All Rights Reserved.&quot;"/>
               </doclet>
           </javadoc>
  -    </target>
  +  </target>
   
  -    <target name="test" depends="compile-test" description="Perform the unit tests"
unless="skip.tests">
  +  <target name="test" depends="compile-test" description="Perform the unit tests" unless="skip.tests">
   
           <echo message="Performing Unit Tests" />
   
  @@ -303,9 +303,9 @@
               </batchtest>
           </junit>
   
  -    </target>
  +  </target>
   
  -    <target name="test-reports" depends="test" description="Generate Reports for the
unit tests">
  +  <target name="test-reports" depends="test" description="Generate Reports for the unit
tests">
   
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkBSF"/>
   
  @@ -326,9 +326,9 @@
           </delete>
           -->
   
  -    </target>
  +  </target>
   
  -    <target name="checkstyle" if="do.checkstyle" description="Checkstyle">
  +  <target name="checkstyle" if="do.checkstyle" description="Checkstyle">
   
           <!-- this invocation of checkstyle requires that checkstyle be downloaded and
setup -->
           <!-- thats why you are required to define do.checkstyle property to generate
the report -->
  @@ -363,9 +363,9 @@
               <formatter type="plain"/>
               <formatter type="xml" toFile="${build.dir}/checkstyle-results.xml"/>
           </checkstyle>
  -    </target>
  +  </target>
   
  -    <target name="checkstyle-report"
  +  <target name="checkstyle-report"
           depends="checkstyle"
           if="do.checkstyle"
           description="Generate Checkstyle Report">
  @@ -377,10 +377,10 @@
               <param name="pathhack" expression="${checkstyle.pathhack}"/>
           </style>
   
  -    </target>
  +  </target>
   
  -    <!-- Creates the distribution -->
  -    <target name="dist"
  +  <!-- Creates the distribution -->
  +  <target name="dist"
           depends="dist-jar, test-reports, checkstyle-report, javadocs"
           description="Generates a distribution (jar + javadocs + unit tests + checkstyle
reports)">
   
  @@ -399,36 +399,36 @@
   
           <delete dir="${dist.dir}" />
   
  -    </target>
  +  </target>
   
  -    <!-- Creates a mini jar-only distribution -->
  -    <target name="dist-jar" depends="jar">
  +  <!-- Creates a mini jar-only distribution -->
  +  <target name="dist-jar" depends="jar">
           <mkdir dir="${dist.dir}"/>
           <copy todir="${dist.dir}">
               <fileset dir="${build.lib}">
                   <include name="*.jar"/>
               </fileset>
           </copy>
  -    </target>
  +  </target>
   
  -    <!-- Creates a minimal distribution -->
  -    <target name="dist.lite"
  +  <!-- Creates a minimal distribution -->
  +  <target name="dist.lite"
           depends="dist-jar, test, javadocs"
           description="Generates a minimal distribution (jar + javadocs)">
   
           <copy file="../LICENSE.txt" todir="${dist.dir}"/>
           <copy file="../KEYS" todir="${dist.dir}"/>
   
  -    </target>
  +  </target>
   
  -    <target name="docs" depends="javadocs, xdocs" 
  +  <target name="docs" depends="javadocs, xdocs" 
            description="generates all the Avalon documentation"/>
   
  -    <target name="xdocs" description="generates the xdocs-based documentation">
  +  <target name="xdocs" description="generates the xdocs-based documentation">
         <ant antfile="${basedir}/../cocoonbuild.xml"/>
  -    </target>
  +  </target>
   
  -    <target name="site" depends="javadocs, docs" 
  +  <target name="site" depends="javadocs, docs" 
              description=" Places Docs ready for hosting on website">
           <mkdir dir="../site/dist/docs/${dir-name}"/>
           <copy todir="../site/dist/docs/${dir-name}">
  @@ -436,24 +436,24 @@
                   <include name="**"/>
               </fileset>
           </copy>
  -    </target>
  +  </target>
   
  -    <!-- Cleans up build and distribution directories -->
  -    <target name="clean" description="Cleans up the project">
  -        <delete file="checkstyle.cache"/>
  -        <delete dir="${build.dir}" />
  -        <delete dir="${dist.dir}" />
  -        <delete dir="test" /> <!-- unit testing output directory -->
  -        <delete>
  -            <fileset dir="." includes="velocity.*"/>
  -            <fileset dir="." includes="**/*~" defaultexcludes="no"/>
  -        </delete>
  -    </target>
  +  <!-- Cleans up build and distribution directories -->
  +  <target name="clean" description="Cleans up the project">
  +    <delete file="checkstyle.cache"/>
  +    <delete dir="${build.dir}" />
  +    <delete dir="${dist.dir}" />
  +    <delete dir="test" /> <!-- unit testing output directory -->
  +    <delete>
  +      <fileset dir="." includes="velocity.*"/>
  +      <fileset dir="." includes="**/*~" defaultexcludes="no"/>
  +    </delete>
  +  </target>
   
  -    <target name="real-clean" depends="clean" 
  +  <target name="real-clean" depends="clean" 
             description="Cleans up the project, including distributions">
  -        <delete dir="${dist.base}" />
  -    </target>
  +    <delete dir="${dist.base}" />
  +  </target>
   
     <!--
     Update the local copy of the corbaloc resolver.
  
  
  
  1.44      +7 -8      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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- kernel.xml	9 Sep 2002 13:34:49 -0000	1.43
  +++ kernel.xml	12 Sep 2002 11:05:52 -0000	1.44
  @@ -47,7 +47,7 @@
      -->
   
      <logging priority="INFO" target="default">
  -     <category priority="WARN"  name="logging" />
  +     <category name="logging" priority="WARN" />
         <target name="kernel">
           <file location="kernel.log" />
         </target>
  @@ -93,7 +93,12 @@
   
        <categories priority="INFO">
          <category priority="WARN"  name="loader" />
  -       <category priority="WARN"  name="kernel" />
  +       <category priority="WARN"  name="loader.services" />
  +       <category priority="WARN"  name="loader.deployment" />
  +       <category priority="WARN"  name="loader.lifecycle" />
  +       <category priority="WARN"  name="loader.resource" />
  +       <category priority="WARN"  name="loader.types" />
  +       <category priority="WARN"  name="loader.types" />
        </categories>
   
        <!--
  @@ -158,10 +163,6 @@
   
        <container name="custom" class="org.apache.excalibur.playground.CustomContainer">
   
  -       <categories priority="INFO">
  -         <category priority="WARN"  name="loader" />
  -       </categories>
  -
          <container name="demo">
   
            <categories priority="INFO">
  @@ -181,8 +182,6 @@
              class="org.apache.excalibur.playground.SimpleComponent" 
              enabled="true" 
              activation="true">
  -
  -           <categories priority="INFO"/>
   
              <configuration>
                <message>This is a custom message.</message>
  
  
  
  1.2       +16 -2     jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ServiceRegistry.java
  
  Index: ServiceRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ServiceRegistry.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServiceRegistry.java	12 Sep 2002 08:30:04 -0000	1.1
  +++ ServiceRegistry.java	12 Sep 2002 11:05:52 -0000	1.2
  @@ -83,11 +83,25 @@
       {
           final String classname = path.replace('/','.');
   
  -        getLogger().debug("service: " + classname );
           Service service = getService( classname );
           if( service == null )
           {
               service= m_builder.build( classname, m_classloader );
  +            if( getLogger().isDebugEnabled() )
  +            {
  +                StringBuffer buffer = new StringBuffer();
  +                buffer.append( "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() );
  +            };
  +            
               m_table.put( classname, service );
           }
           return service;
  
  
  
  1.13      +5 -5      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeRegistry.java
  
  Index: TypeRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeRegistry.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TypeRegistry.java	11 Sep 2002 11:39:25 -0000	1.12
  +++ TypeRegistry.java	12 Sep 2002 11:05:52 -0000	1.13
  @@ -73,8 +73,8 @@
       {
           m_classloader = loader;
           super.enableLogging( logger );
  -        m_typeBuilder.enableLogging( logger.getChildLogger("component") );
  -        m_blockBuilder.enableLogging( logger.getChildLogger("block") );
  +        m_typeBuilder.enableLogging( logger );
  +        m_blockBuilder.enableLogging( logger );
           getLogger().debug("type registry established");
       }
   
  @@ -107,7 +107,7 @@
       {
           final String classname = path.replace('/','.');
   
  -        getLogger().info("type: " + classname );
  +        getLogger().debug("type: " + classname );
           Type type = getType( classname );
           if( type == null )
           {
  @@ -130,7 +130,7 @@
       {
           final String classname = path.replace('/','.');
   
  -        getLogger().info("block: " + classname );
  +        getLogger().debug("block: " + classname );
           Type type = getType( classname );
           if( type == null )
           {
  
  
  
  1.8       +1 -1      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/DeploymentHelper.java
  
  Index: DeploymentHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/DeploymentHelper.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DeploymentHelper.java	9 Sep 2002 04:33:53 -0000	1.7
  +++ DeploymentHelper.java	12 Sep 2002 11:05:52 -0000	1.8
  @@ -154,7 +154,7 @@
               throw new NullPointerException("profile");
           }
   
  -        getLogger().info("deployment initiated for '" + profile.getName() + "'." );
  +        getLogger().debug("deployment initiated for '" + profile.getName() + "'." );
   
           //
           // handle the declaration of the logging categories based on the type 
  
  
  
  1.11      +2 -2      jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/LifecycleHelper.java
  
  Index: LifecycleHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/LifecycleHelper.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LifecycleHelper.java	9 Sep 2002 04:33:53 -0000	1.10
  +++ LifecycleHelper.java	12 Sep 2002 11:05:52 -0000	1.11
  @@ -100,7 +100,7 @@
               throw new NullPointerException("provider");
           }
   
  -        getLogger().info("startup initiated for '" + path + "'." );
  +        getLogger().debug("startup initiated for '" + path + "'." );
   
           int stage = 0;
           try
  @@ -216,7 +216,7 @@
           throws LifecycleException
       {
   
  -        getLogger().info("shutdown initiated for '" + name + "'." );
  +        getLogger().debug("shutdown initiated for '" + name + "'." );
   
           //Stage at which failure occured
           int stage = 0;
  
  
  

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