[slf4j-dev] Separating API and binding

Ceki Gülcü listid at qos.ch
Mon Jul 17 21:26:46 CEST 2006


At 12:59 AM 7/17/2006, Graham Lea wrote:
>Are you planning on the "binding" still occurring in StaticLogBinder?

Yes.

>If so, in which jar would this class be?
>I'll assume "the logging-specific JAR", and ask the next question, which 
>is, Is it a good idea for the API jar to refer to a class that is not in 
>the API?

I see what you mean. However, as I see it, the LoggerFactory class and in 
particular the LoggerFactory.getLogger have to be considered as *not* being 
part of the API. Admittedly, its a doubtful premise, but I don't think we 
can do better without dropping the static factory mechanism embodied in 
LoggerFactory. Supplying the appropriate LoggerFactory class with the 
binding becomes part of the SLF4J contract.

>Is the separation really cleaner if the API jar requires classes that 
>aren't contained in itself?

Well, the API would only consist of interfaces (and smaller helper 
classes), I believe the approach allows the implementation of services 
using for example OSGI, which is not currently possible.

>Some things to think about there.
>Come back at me if what I've said doesn't make sense.

It makes sense. Thank you for your input.


>Graham.

-- 
Ceki Gülcü
http://ceki.blogspot.com/




More information about the slf4j-dev mailing list