avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mirceat...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/logger/factory JMSTargetFactory.java
Date Wed, 19 Dec 2001 23:36:25 GMT
mirceatoma    01/12/19 15:36:25

  Modified:    src/java/org/apache/avalon/excalibur/logger/factory
                        JMSTargetFactory.java
  Log:
  Move formatter generation in a protected method.
  
  Revision  Changes    Path
  1.2       +15 -12    jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/logger/factory/JMSTargetFactory.java
  
  Index: JMSTargetFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/logger/factory/JMSTargetFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JMSTargetFactory.java	2001/09/10 19:47:04	1.1
  +++ JMSTargetFactory.java	2001/12/19 23:36:25	1.2
  @@ -62,7 +62,7 @@
    * </pre>
    *
    * @author <a href="mailto:mirceatoma@home.com">Mircea Toma</a>;
  - * @version CVS $Revision: 1.1 $ $Date: 2001/09/10 19:47:04 $
  + * @version CVS $Revision: 1.2 $ $Date: 2001/12/19 23:36:25 $
    */
   public class JMSTargetFactory implements LogTargetFactory
   {
  @@ -139,21 +139,24 @@
                   properties[i] = new PropertyInfo(name, type, aux);
               }
   
  -            final Formatter formatter;
  +            final Formatter formatter = getFormatter( formatterConf );
               
  -            if ( null != formatterConf )
  -            {
  -                final FormatterFactory formatterFactory = new FormatterFactory();
  -                formatter = formatterFactory.createFormatter( formatterConf );
  -            }
  -            else
  -            {
  -                formatter = null;
  -            }                
  -            
               return new TextMessageBuilder( properties, formatter );
           }
                   
           return new ObjectMessageBuilder();        
  +    }
  +
  +    protected Formatter getFormatter( final Configuration conf )
  +    {
  +        Formatter formatter = null;
  +
  +        if ( null != conf )
  +        {
  +            final FormatterFactory formatterFactory = new FormatterFactory();
  +            formatter = formatterFactory.createFormatter( conf );
  +        }
  +        
  +        return formatter;
       }
   }
  
  
  

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