Vincent Tenc� wrote:
> Hi,
> 
> We had that reflexion some weeks ago at work and we came to the conclusion
> that reusable components like pools should not use ERROR but rather WARNING
> log level. The motivation is that the definition of ERROR is specific to the
> application and we dont want to have third-party components logging at that
> level. In production, when we turn ERROR on to monitor what's going on on
> the system, we want to be able to be selective on what is logged so the log
> file remains readable and problems are easier to spot.
> 
> What do you guys think?

I pretty much agree.  You might want to check your system clock (it
thinks we are still in 2000).

Actually, the fact that it logs at DEBUG is fine.  It is there to catch
any issues with the Pool code itself.  Therefore you don't really want
it shoving out several hundreds of messages if you can help it.

> 
> Vicnent
> 
> ----- Original Message -----
> From: "Leo Sutic" <[EMAIL PROTECTED]>
> To: "Avalon Developer's List" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 26, 2002 2:17 PM
> Subject: AbstractPool logging
> 
> 
> 
>>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]>
> 
>>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 



-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to