All,
currently the AbstractPool implementation in Excalibur logs failure to
instantiate a component with a DEBUG level.
I propose to change this to ERROR.
The same change for:
- when an exception is caught decomissioning an object.
- "factory created class was null so a new instance could not be created."
Motivation being that all three cases involve an Exception being caught and
not re-thrown or wrapped. Thus, if the log level is not set to DEBUG, the
client will just recieve a ComponentException ("could not find component")
with no further explanation.
+1 from me.
/LS
The patch is:
@@ -95,9 +95,9 @@
}
catch (Exception e)
{
- if (getLogger().isDebugEnabled())
+ if (getLogger().isErrorEnabled())
{
- getLogger().debug("Error decommissioning object", e);
+ getLogger().error("Error decommissioning object", e);
}
}
}
@@ -127,17 +127,17 @@
}
catch( final Exception e )
{
- if( null != getLogger() && getLogger().isDebugEnabled() )
+ if( null != getLogger() && getLogger().isErrorEnabled() )
{
Class createdClass = m_factory.getCreatedClass();
if (createdClass == null)
{
- getLogger().debug( "factory created class was null
so a new "
+ getLogger().error( "factory created class was null
so a new "
+ "instance could not be created.", e );
}
else
{
- getLogger().debug( createdClass.getName() +
+ getLogger().error( createdClass.getName() +
": could not be instantiated.",
e );
}
}
@@ -158,9 +158,9 @@
}
catch( final Exception e )
{
- if( null != getLogger() &&
getLogger().isDebugEnabled() )
+ if( null != getLogger() &&
getLogger().isErrorEnabled() )
{
- getLogger().debug(
m_factory.getCreatedClass().getName() +
+ getLogger().error(
m_factory.getCreatedClass().getName() +
": improperly decommissioned.",
e );
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>