avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger DefaultLogTargetManager.java
Date Tue, 06 Aug 2002 02:01:49 GMT
leif        2002/08/05 19:01:49

  Modified:    logger/src/java/org/apache/avalon/excalibur/logger
                        DefaultLogTargetManager.java
  Log:
  Fix a NPE when a log target factory is referenced but not defined in the logger
  configuration.
  
  Revision  Changes    Path
  1.3       +6 -1      jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/DefaultLogTargetManager.java
  
  Index: DefaultLogTargetManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/DefaultLogTargetManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultLogTargetManager.java	21 May 2002 10:04:18 -0000	1.2
  +++ DefaultLogTargetManager.java	6 Aug 2002 02:01:49 -0000	1.3
  @@ -72,6 +72,11 @@
           {
               final String targetName = confs[ i ].getName();
               final LogTargetFactory logTargetFactory = m_factoryManager.getLogTargetFactory(
targetName );
  +            if ( logTargetFactory == null )
  +            {
  +                throw new ConfigurationException( "Factory definition for '" + targetName
  +                    + "' missing from logger configuration." );
  +            }
               final LogTarget logTarget = logTargetFactory.createTarget( confs[ i ] );
               final String targetId = confs[ i ].getAttribute( "id" );
               if( getLogger().isDebugEnabled() )
  
  
  

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