[slf4j-dev] discussion about LogService ranking in osgi-over-slf4j

Christian Trutz christian.trutz at belaso.de
Tue Oct 23 20:05:15 CEST 2012


Hi osgi-over-slf4j developers,

I've tested osgi-over-slf4j 1.7.2 with equinox 3.8 and cannot use the SLF4J
LogService because
Equinox register also a LogService with default ranking 0. SLF4J gets also
ranking 0 (default ranking)
because no service ranking is explicitly set. Is it OK for you if I
introduce ranking = 10 for SLF4J LogService?
If want to commit following change:

        Properties props = new Properties();
        *props.put(Constants.SERVICE_DESCRIPTION, "An SLF4J LogService
implementation.");
        props.put(Constants.SERVICE_RANKING, 10);*
        ServiceFactory factory = new LogServiceFactory();
        bundleContext.registerService(LogService.class.getName(), factory,
props);

to org.slf4j.osgi.logservice.impl.Activator. I also think, that we should
made log service ranking configurable ... (via system property for example).
With the above change, I can also see OSGi log messages in Beagle ;-) Thats
COOL ...

Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-dev/attachments/20121023/b5a27887/attachment.html>


More information about the slf4j-dev mailing list