[slf4j-user] What about NDC in slf4j ?

Boris Unckel boris.unckel.mlg at gmx.net
Wed Feb 15 13:23:52 CET 2006


Hello Frank,

> > You have three options:
> > 1) Stay at log4j (Why change from one of the best logging APIs in an
> > application to an facade/wrapper ?)
> 
> Well, you're right... I see two main reasons that would possibly be
> taken into account :
> 
> - keep the possiblity to switch implementation in case the final client
> already has a logging infrastructure and wants to integrate the
> product's logs in it
See Ceki's mail...
> 
> - get rid of those multiple (if logger.isDebugEnabled()) tests in my
> code with parametrized messages
A feature of slf4j or java.util.logging. For your case I would prefer slf4j
and use x4juli in the backend.
> Would you think these are good reasons, or am I missing some point ?
No missing point, well thought.

I do not know the users/adminstrators and the environment of your
application. If you are using Ceki's approach (slf4j + log4j in the backend)
document well that one is not able to change the underlying log API because
of the NDC.

Regards
Boris



More information about the slf4j-user mailing list