You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2004/02/20 23:47:13 UTC

cvs commit: avalon/logging/logkit/test/conf logging.xml

mcconnell    2004/02/20 14:47:13

  Modified:    logging/logkit/impl maven.xml
               logging/logkit/impl/src/java/org/apache/avalon/logging/logkit
                        DefaultLoggingCriteria.java
               logging/logkit/test/conf logging.xml
  Log:
  Enhance criteria handling to support the improved defaults management model.
  
  Revision  Changes    Path
  1.3       +0 -15     avalon/logging/logkit/impl/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon/logging/logkit/impl/maven.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- maven.xml	19 Feb 2004 12:25:28 -0000	1.2
  +++ maven.xml	20 Feb 2004 22:47:13 -0000	1.3
  @@ -4,21 +4,6 @@
       <attainGoal name="avalon:artifact"/>
     </postGoal>
   
  -  <postGoal name="java:compile">
  -    <ant:echo file="${maven.build.dir}/classes/avalon.logging.properties">
  -#===================================================================#
  -# Default logging implementation properties                         #
  -#===================================================================#
  -
  -#
  -# No properties are defined at this time.
  -#
  -#
  -# EOF
  -#
  -</ant:echo>
  -  </postGoal>
  -
     <postGoal name="jar:install">
       <ant:copy verbose="yes"
          toDir="${maven.repo.local}/${pom.groupId}/jars" 
  
  
  
  1.5       +9 -9      avalon/logging/logkit/impl/src/java/org/apache/avalon/logging/logkit/DefaultLoggingCriteria.java
  
  Index: DefaultLoggingCriteria.java
  ===================================================================
  RCS file: /home/cvs/avalon/logging/logkit/impl/src/java/org/apache/avalon/logging/logkit/DefaultLoggingCriteria.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultLoggingCriteria.java	19 Feb 2004 12:25:29 -0000	1.4
  +++ DefaultLoggingCriteria.java	20 Feb 2004 22:47:13 -0000	1.5
  @@ -126,19 +126,20 @@
               final String key = context.getApplicationKey();
               final File work = context.getInitialWorkingDirectory();
               DefaultsBuilder builder = new DefaultsBuilder( key, work );
  -            Properties bootstrap = 
  -              Defaults.getStaticProperties( 
  -                DefaultLoggingCriteria.class, DEFAULTS );
  +            Properties defaults = 
  +              Defaults.getStaticProperties( DefaultLoggingCriteria.class );
  +
  +            final String[] keys = super.getKeys();
               Properties properties = 
  -              builder.getConsolidatedProperties( bootstrap, KEYS );
  +              builder.getConsolidatedProperties( defaults, keys );
   
               //
               // apply any non-null properties to the criteria
               //
   
  -            for( int i=0; i<KEYS.length; i++ )
  +            for( int i=0; i<keys.length; i++ )
               {
  -                final String propertyKey = KEYS[i];
  +                final String propertyKey = keys[i];
                   final String value = properties.getProperty( propertyKey );
                   if( null != value )
                   {
  @@ -149,8 +150,7 @@
           catch ( IOException e )
           {
               throw new LoggingRuntimeException( 
  -             "Failed to load implementation defaults resource: "
  -             + DEFAULTS, e );
  +             "Failed to load implementation default resources.", e );
           }
       }
   
  
  
  
  1.3       +21 -5     avalon/logging/logkit/test/conf/logging.xml
  
  Index: logging.xml
  ===================================================================
  RCS file: /home/cvs/avalon/logging/logkit/test/conf/logging.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- logging.xml	14 Feb 2004 03:50:12 -0000	1.2
  +++ logging.xml	20 Feb 2004 22:47:13 -0000	1.3
  @@ -40,19 +40,35 @@
       </multicast>
   
       <!--
  -    The datagram target is a demonstration of the declaration of 
  -    a plugin target.
  +    This target is a demonstration of the declaration of 
  +    a datagram plugin target.
       -->
       <target id="datagram"
  -        artifact="avalon-logging/avalon-logkit-datagram?version=1.0-SNAPSHOT">
  +        artifact="avalon-logging/avalon-logkit-datagram#1.0-SNAPSHOT">
         <address hostname="localhost" port="0"/>
       </target>
   
       <!--
  +    The target is a demonstration of the declaration of 
  +    the syslog plugin target.
  +    -->
  +    <target id="syslog"
  +        artifact="avalon-logging/avalon-logkit-syslog#1.0-SNAPSHOT">
  +      <address hostname="localhost" port="514" facility="USER"/>
  +      <format type="extended">
  +        %7.7{priority} %23.23{time:yyyy-MM-dd HH:mm:ss:SSS}   [%25.25{category}] : %{message}\n%{throwable}
  +      </format>
  +    </target>
  +
  +    <!--
  +    The target shows the configuration of a plugable smtp target (which 
  +    has not been committed to CVS yet).
  +    -->
  +    <!--
       <target id="smtp"
  -        artifact="avalon-logging/avalon-logkit-smtp?version=1.0-SNAPSHOT">
  +        artifact="avalon-logging/avalon-logkit-smtp#1.0-SNAPSHOT">
         <to>mcconnell@osm.net</to>
  -      <from>mcconnell@osm.net</from>
  +      <from>info@dpml.net</from>
         <subject>logging target test</subject>
         <maximum-size>1</maximum-size>
         <session>
  
  
  

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