You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by pr...@apache.org on 2002/06/25 22:44:26 UTC
cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler ComponentFactory.java
proyal 2002/06/25 13:44:26
Modified: fortress/src/java/org/apache/excalibur/fortress/handler
ComponentFactory.java
Log:
* Handle instances where there is no configuration
* Make sure debug is enabled before logging
Revision Changes Path
1.14 +4 -4 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentFactory.java
Index: ComponentFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentFactory.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ComponentFactory.java 18 Jun 2002 18:45:36 -0000 1.13
+++ ComponentFactory.java 25 Jun 2002 20:44:26 -0000 1.14
@@ -106,15 +106,15 @@
if( component instanceof LogEnabled )
{
- final String logger = m_configuration.getAttribute( "logger", null );
+ final String logger = ( m_configuration == null ? null : m_configuration.getAttribute( "logger", null ) );
if( null == logger )
{
- m_logger.debug( "no logger attribute available, using standard logger" );
+ if( m_logger.isDebugEnabled() ) m_logger.debug( "no logger attribute available, using standard logger" );
( (LogEnabled)component ).enableLogging( m_logManager.getDefaultLogger() );
}
else
{
- m_logger.debug( "logger attribute is " + logger );
+ if( m_logger.isDebugEnabled() ) m_logger.debug( "logger attribute is " + logger );
( (LogEnabled)component ).enableLogging( m_logManager.getLoggerForCategory( logger ) );
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>