Hi Matt,

OK you are right, hard-coding service ranking is too pragmatic. But how
about making SLF4J LogService a OSGi managed service (with updated()
method). The developer/user can then set the service ranking via admin
console ...

Christian

2012/10/23 Matthew Bishop <[email protected]>

>  Hi Christian,
>
>  Thank you for the suggestion. We have had a pretty good discussion about
> the eclipse case and came to the conclusion that it would not be a good
> idea to change the service ranking but instead to create a specific Eclipse
> logger that can catch all the various Eclipse log events (I think there are
> three total) and log them to SLF4J. It could depend on this specific
> LogService via the service query. The Eclipse LogService could then provide
> a higher service level, even with a Property that would be settable in the
> Eclipse prefs.
>
>  Osgi-over-slf4j has many places to live other than Eclipse so it needs
> to play nice across the board. Upping the service ranking in code is
> definitely not nice.
>
>  Matt
>
>
>   From: Christian Trutz <[email protected]>
> Reply-To: slf4j developers list <[email protected]>
> Date: Tuesday, 23 October, 2012 11:05 AM
> To: "[email protected]" <[email protected]>
> Subject: [slf4j-dev] discussion about LogService ranking in
> osgi-over-slf4j
>
>  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
>
>     Matthew Bishop, Senior Architect  Phone: 604.408.8078 ext. 101  Email:
> [email protected]      *Elastic Path Software, Inc.*
> Web elasticpath.com <http://www.elasticpath.com/>| Blog getelastic.com
> <http://www.getelastic.com/>| Twitter twitter.com/elasticpath
> <http://www.twitter.com/elasticpath>
> Careers elasticpath.com/jobs <http://www.elasticpath.com/jobs> |
> Community grep.elasticpath.com
>
> Confidentiality Notice: This message is intended only for the use of the
> designated addressee(s), and may contain information that is privileged,
> confidential and exempt from disclosure. Any unauthorized viewing,
> disclosure, copying, distribution or use of information contained in this
> e-mail is prohibited and may be unlawful. If you received this e-mail in
> error, please reply to the sender immediately to inform us you are not the
> intended recipient and delete the email from your computer system.
>
>
>
> _______________________________________________
> slf4j-dev mailing list
> [email protected]
> http://mailman.qos.ch/mailman/listinfo/slf4j-dev
>
_______________________________________________
slf4j-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/slf4j-dev

Reply via email to