mcconnell    2002/07/20 22:03:11

  Modified:    assembly/src/java/org/apache/excalibur/merlin/container
                        DefaultContainer.java
               assembly/src/java/org/apache/excalibur/merlin/model
                        LoggingDescriptor.java
  Added:       assembly/src/java/org/apache/excalibur/merlin/container
                        DefaultSelector.java
  Log:
  updating the logging manager to correctly handle root logging defaults
  
  Revision  Changes    Path
  1.14      +3 -3      
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java
  
  Index: DefaultContainer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DefaultContainer.java     20 Jul 2002 00:54:07 -0000      1.13
  +++ DefaultContainer.java     21 Jul 2002 05:03:10 -0000      1.14
  @@ -615,8 +615,8 @@
       }
   
      /**
  -    * Return the set of exportable services from this container.
  -    * @return the exporable service descriptors
  +    * Internal validation.  Propably no longer needed.
  +    * @param map the dependency map
       */
       private void validateResourceMapping( Map map )
       {
  
  
  
  1.1                  
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultSelector.java
  
  Index: DefaultSelector.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  
  package org.apache.excalibur.merlin.container;
  
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  import org.apache.excalibur.merlin.model.Profile;
  
  
  /**
   * Default selector class.
   *
   * @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
   * @version $Revision: 1.1 $ $Date: 2002/07/21 05:03:10 $
   */
  class DefaultSelector extends AbstractLogEnabled
  implements Selector
  {
     /**
      * Returns the preferred profile form an available selection of candidate 
provider profiles.
      * @param facilities the set of profiles of potential service providers 
available in the 
      *   container hierachy
      * @param profiles the set of profiles of potential service providers 
contained with the 
      *   local container
      * @return the preferred provider or null if no satisfactory provider can 
be established 
      *    from the supplied profiles.
      */
      public Profile select( Profile[] facilities, Profile[] profiles )
      {
          //
          // apply default selection policy
          //
  
          Profile profile = select( profiles, Profile.EXPLICIT );
          if( profile == null )
          {
              profile = select( facilities );
          }
          else
          {
              getLogger().debug("local selection: " + profile );
          }
          if( profile == null )
          {
              profile = select( profiles );
          }
          else
          {
              getLogger().debug("facility selection: " + profile );
          }
          return profile;
      }
  
      private Profile select( Profile[] profiles )
      {
          Profile profile = select( profiles, Profile.EXPLICIT );
          if( profile == null ) profile = select( profiles, Profile.PACKAGED );
          if( profile == null ) profile = select( profiles, Profile.IMPLICIT );
          return profile;
      }
  
      private Profile select( Profile[] profiles, int mode )
      {
          for( int i=0; i<profiles.length; i++ )
          {
              if( profiles[i].getMode() == mode )
                return profiles[i];
          }
          return null;
      }
  
  }
  
  
  
  1.5       +2 -2      
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/LoggingDescriptor.java
  
  Index: LoggingDescriptor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/LoggingDescriptor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LoggingDescriptor.java    20 Jul 2002 05:03:01 -0000      1.4
  +++ LoggingDescriptor.java    21 Jul 2002 05:03:11 -0000      1.5
  @@ -23,7 +23,7 @@
    * The target defaults of "default" which corresponds to a internal default 
logging 
    * target that issue messages to System.out (unless overriden by a target 
named default).  
    * If the target is declared inside a catagory element, it must refer to a 
named target 
  - * element.  The priority attribute may container one of the values 
<code>DEBUG</code>
  + * element.  The priority attribute may container one of the values 
    * <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code> or 
<code>ERROR</code>.
    * The target must contain a single file element with the attribute 
<code>location</code>
    * the corresponds to the name of the logging file.</p>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to