Matthew Bishop <Matthew.Bishop <at> elasticpath.com> writes:
[snip]
> My experience with inject vs. static binding to loggers is mixed, meaning 
> some 
people won't, or cannot,
> accept the injected approach. We need to have both methods of acquiring 
> logger 
instances.
> 
> I have a Guice injection module that I can contribute. I think you have 
something similar for Spring.
> Interested in putting something together as an injection starting point?

Matthew,

I agree the first concern should be to keep a clear backwards-compatibility 
route and that applies to clients using LoggerFactory.getLogger() static calls, 
as well as to implementation providers expecting a hook on StaticLoggerBinding. 
Clearly, it means we must keep the whole system.

However, it seems reasonably easy and with little side effects to just "cut" 
the 
system into its own JAR.

It is then up to users to choose whether they want to keep using static binding 
and drop that support JAR in their classpath, or whether they want to do the 
wiring using their favorite injection framework (using ILoggerFactory.class as 
service/injection key).

I think that once we have made that cut, we could provide handy bindings for 
integration with DI frameworks such as the Guice bindings you made. I found the 
Spring example through a Google search, but I am personally writing such an 
extension for iPojo, an OSGi component framework. 

-- 
Simon


> 


_______________________________________________
slf4j-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/slf4j-dev

Reply via email to