felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: [Discuss] Do we need to support other logging frameworks in felix framework?
Date Fri, 24 Feb 2017 15:30:06 GMT
Karl Pauls wrote
>> What about using the LogService once it is available to log. As this is
>> usually one of the first bundles (hopefully) this can then use whatever
>> logging mechanism is deployed - instead of trying to support all of the
>> available things out there.
> No. We tried that before and we had issues with this approach. It
> makes the most sense but it opens up deadlock possibilities in all
> sort of ways as we might be logging in places where we hold framework
> and classloading/resolving specific locks. Calling out to bundles at
> that point is a really bad idea, unfortunately.

Ok, yes, I see...too bad.

>> The current way works, but is not portable which means you have to do
>> other things if running a different framework - which I think is bad.
> I agree, but we can't really get around that. However, we did
> previously just used the osgi LogService interfaces and that was what
> we supported to have passed to the framework for logging (just not
> from a bundle).
But that can get into some strange class hierarchy problems, you need
the LogService class outside to pass it into the framework.

I guess it would be nice if the launcher api had a simple logger
interface which you could implement and pass into the framework factory.
Then everyone can implement this in any way they want and this would be
portable across framework implementations.

Carsten Ziegeler
Adobe Research Switzerland

View raw message