[slf4j-dev] Re: TRACE level

Jens Elkner jel at freddytel.biz
Thu Jul 7 09:09:07 CEST 2005


Hi,

I just found the new slf4j and thought, perhaps this time it is possible
to get something with the trace() method (ie. I really miss this level
in log4j). 

The marker stuff is a nice add on, but actually, how does one know,
which markers are used in an application and especially where? Well,
perhaps I'm a little outside of the circle when thinking on end users,
but I think, making it easy for them as well, can't be fault.

So, I really like Endre's perfect 5-level-hierarchy!

What we see, not having a trace level, is that other levels are misused,
which leads to the fact, that one tends e.g. to allow the logging of ERRORS,
only. But doing this, one usually looses some WARNings/INFOs, which are
important!

Here some examples:

FOP - very bad - I decided to programatically switch the level
to FATAL, because all the logged stuff below FATAL is usually completely 
useless for an enduser.

Or common-httpclient. I guess, since there is no real trace(), they used
debug() for verbose output and info() for debug(). Usually almost everything
logged in the info() level is IMHO developer info - i.e. nothing important
for the enduser or anything, where the enduser can do something ...

Or hibernate - almost the same thing, but they are even mixing developer
info and enduser infos into one level (info). So usually, an application
programatically disables the hibernate info/debug stuff, since the stuff
is usually totaly superfluous for the enduser but also losses some
"interesting" messages.

IMHO, logging should be used in the first case, to support/inform the
end user about important stuff or errors and in a manner, he can
probably understand, and not to flood with information, 
which he does not understand (e.g. stacktraces) or takes im hours
to read (which leads to ignorance again) nor he can do anything
about it (actually I'm using log4j about 5 year and never put a stack
trace into a level > DEBUG). 

In the second case, it should support the developer, to find defects.
Here, at least some people, need at least to levels, one to roughly
isolate the problem and sometimes a very verbose trace/info, to get
the tricky details ... 

So I opt for the "simple and easy" way, i.e. Endre's perfect
5-level-hierarchy.

Regards,
jens.
-- 
+---[ Jens Elkner ]--------------------------------------------------------+
| Walther-Rathenau-Str. 58                 elkner at linofee.org              |
| 39104 Magdeburg   GERMANY           http://www.linofee.org/~jel/         |
+--------------------------------------------------------------------------+



More information about the slf4j-dev mailing list