|
Home > Archive > Apache Directory Project > July 2005 > 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 |
FATAL in SLF4J, was: [VOTE] Logging Direction
|
|
| Ceki Gülcü 2005-07-04, 5:45 pm |
|
Trustin Lee wrote:
> SLF4J doesn't have "FATAL" level AFAIK. Would this be OK?
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
--=20
Ceki G=FClc=FC
The complete log4j manual: http://www.qos.ch/log4j/
| |
| Alex Karasulu 2005-07-04, 5:45 pm |
| Thanks Ceki for your response to these questions. It helps while =20
making our choices. Anyway looks like we're going with SLF4J as a =20
result of the vote that is due to close.
Alex
On Jul 4, 2005, at 4:30 PM, Ceki G=FClc=FC wrote:
>
> 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 =20
> FATAL
> level?
>
> =46rom the stand point of a logging system, the distinction =20
> between a
> fatal error and an error is usually not very useful. Most =20
> programmers
> exit the application when a fatal error is encountered. =20
> However, a
> logging library cannot (and should not) decide on its own to =20
> terminate
> an application. The initiative to exit the application must be =20
> left to
> the developer.
>
> Thus, the most the FATAL level can do is to highlight a given =20
> error as
> the cause for application to crash. However, errors are by =20
> definition
> exceptional events that merit attention. If a given situation =20
> causes
> errors to be logged, the causes should be attended to as =20
> soon as
> possible. However, if the "error" is actually a normal situation =20
> which
> cannot be prevented but merits being aware of, then it =20
> should be
> marked as WARN, not ERROR.
>
> Assuming the ERROR level designates exceptional situations =20
> meriting
> close attention, we are inclined to believe that the FATAL =20
> level is
> superfluous.
>
> Does this answer your question?
>
> [1] http://slf4j.org/faq.html#2.5
>
> --=20
>
> Ceki G=FClc=FC
>
> The complete log4j manual: http://www.qos.ch/log4j/
>
>
>
|
|
|
|
|