Apache Directory Project - Re: FATAL in SLF4J, was: [VOTE] Logging Direction

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > July 2005 > Re: FATAL in SLF4J, was: [VOTE] Logging Direction





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: FATAL in SLF4J, was: [VOTE] Logging Direction
Trustin Lee

2005-07-05, 2:45 am

Let's assume that you've programmed a client application that always should
be connected to the server. Disconnection from server prevents the
application from functioning but we cannot say that it is a FATAL situation
because server will get up and run soon possibly. We'll have to say it is in
a FATAL situation if client cannot proceed the reconnect process by some
reason.
So I think ERROR and FATAL level are both required. WARN, ERROR and FATAL
both represents exceptional situation, but three has some different meaning:
* WARN - exceptional situation, but safely ignorable because the
application can recover itself.
* ERROR - exceptional situation that requires user's attention because of
temporary malfunction of the application. The application can recover from
this situation automatically if other environment changes.
* FATAL - exceptional situation that we really didn't expected or that makes
the application stop permanently.
Trustin
2005/7/5, Ceki Gülcü <listid-vdLmLxQ6Fys@public.gmane.org>:
>
>
> Trustin Lee wrote:
>
>
> This question is answered in the SLF4J FAQ [1] quoted below:
>
> Why doesn't the org.slf4j.Logger interface have methods for the FATAL
> level?
>
> From the stand point of a logging system, the distinction between a
> fatal error and an error is usually not very useful. Most programmers
> exit the application when a fatal error is encountered. However, a
> logging library cannot (and should not) decide on its own to terminate
> an application. The initiative to exit the application must be left to
> the developer.
>
> Thus, the most the FATAL level can do is to highlight a given error as
> the cause for application to crash. However, errors are by definition
> exceptional events that merit attention. If a given situation causes
> errors to be logged, the causes should be attended to as soon as
> possible. However, if the "error" is actually a normal situation which
> cannot be prevented but merits being aware of, then it should be
> marked as WARN, not ERROR.
>
> Assuming the ERROR level designates exceptional situations meriting
> close attention, we are inclined to believe that the FATAL level is
> superfluous.
>
> Does this answer your question?
>
> [1] http://slf4j.org/faq.html#2.5
>
> --
>
> Ceki Gülcü
>
> The complete log4j manual: http://www.qos.ch/log4j/
>
>



--
what we call human nature is actually human habit
--
http://gleamynode.net/

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com