[slf4j-dev] [Bug 236] Use standard java.util.ServiceLoader for SLF4J Binding

bugzilla-daemon at qos.ch bugzilla-daemon at qos.ch
Thu Oct 18 10:21:25 CEST 2012


http://bugzilla.slf4j.org/show_bug.cgi?id=236

Simon Chemouil <schemouil+slf4j at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schemouil+slf4j at gmail.com

--- Comment #11 from Simon Chemouil <schemouil+slf4j at gmail.com> 2012-10-18 10:21:24 CEST ---
(In reply to comment #10)
> For OSGi experts :
> What would be the best thing to do to instantiate the right implementation?

>From an OSGi standpoint, j.u.ServiceLoader can work jumping through hoops as
Philippe described (there is an implementation of such a bridge at Apache Aries
[1]).

> The current one seems not be the best one:
> http://informatics-science.blogspot.fr/2012/10/osgi-friendly-apis.html

Using j.u.ServiceLoader won't solve the problem described here, even though it
could improve the situation as it is more general than what slf4j's static
binding currently does, and could more easily be ignored.
The proposal linked in my blog is to provide a lighter version of slfj4-api
that doesn't know about binding at all. It could help adopting ServiceLoaders,
because it would be up to anyone to choose the binding their prefer. 

In general, this slf4j-api-light artifact could make the life easier for slf4j
on Android, OSGi and those who'd rather declare implementations using
ServiceLoaders.


[1] http://aries.apache.org/modules/spi-fly.html

-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the slf4j-dev mailing list