Carsten Ziegeler wrote:

>Ok, very interesting approach - ok, I agree that this is a way or working
>which requires to choose different loggers for different components (or
>types)
>etc.
>We simply look in the error log and don't care about other logs or
>categories. And in this error log the message and the exception is logged.
>
>Ok, how can we get a consense here?
>
>I would agree with you, if you look the message not with the level
>"error" but with level "warn". :)
>What do you think about this?
>  
>

Actually, this is something I was considering by looking at the priority 
filter in logkit.xconf that directs all errors regardless their category 
to the error log file. I also considered redirecting only "core" errors 
to that file.

Referring to the definition of priorities (see 
http://jakarta.apache.org/avalon/logkit/whitepaper.html), we see that a 
warning is "A problem or conflict has occurred but it may be 
recoverable, then again it could be the start of the system failing".

So we can consider that a low-level component that fails should issue 
warnings instead of errors since it doesn't know if the error can be 
recovered by a higher-level component. This also shows that the logging 
priority is a relative concept that depends on the responsibility of a 
component in the system.

So ok for warn !

So as a summary :
- Logging _errors_ is reserved to high-level entities such as Cocoon and 
CocoonServlet,
- A component that fails _can_ log a _warning_ before throwing an exception,
- An exception that is catched and propagated _must not_ be logged, even 
if wrapped in a CascadingException.

Do we agree on this ?

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies                  Apache Cocoon
  http://www.anyware-tech.com           mailto:[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to