[slf4j-dev] Trace and/or Ignore.

robert burrell donkin robertburrelldonkin at blueyonder.co.uk
Sun Jul 3 23:22:51 CEST 2005


On Wed, 2005-06-29 at 13:12 +0200, Endre Stølsvik wrote:

<snip>

> I'd just like to comment on this topic, as trace is (or rather would be) 
> my favourite log-level ever. It has kinda become "a hot topic" with lots 
> of arguments.

but it's also the most badly abused

> The main problem with debug is that it is the only "development-level" 
> available in log4j, and (thus) also in slf4j.

ceki's convinced me that (nearly all of the time) the reason for this is
poor logging strategy. 

> One should have (at least) one more, and this is in my head obviously 
> "trace". This is acknowledged in most other logging packages, where a 
> level above debug usually is provided. Notable examples: apache commons 
> logging. 

FWIW IIRC we never had any particularly reasons why we added trace.
there is really very few good things to be said for trace in application
code that couldn't be done better through improved logging strategy. too
often most developers just get confused by debug and trace.

> JBoss have actually extended log4j with the "XLevel" log4j 
> example that is TRACE. 

the main exception is IMHO libraries, containers and frameworks. again,
most logging in these just isn't well enough thought through to benefit
from having a trace. 

there is some benefit to users if non-application code does not clog up
the debug level with the sort of chatty logging that can be required to
diagnose some problems. (yes, i know that there are ways round this but
there is a certain amount of pressure to make things run well out of the
box.)

IMHO the main reason to have a trace level (though) is to stop the
endless complaints from users when you don't have it...

- robert




More information about the slf4j-dev mailing list