felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: System Logger
Date Mon, 16 Feb 2009 07:55:18 GMT
Hi Pete,

Pete Haidinyak schrieb:
> Good evening,
>     I am writting an application with Felix is being embedded. I am
> using Log4j for the code running outside of my OSGi code. What would be
> the best way to setup Felix to use the existing Log4j?

For the framework itself, you might want to extend the
o.a.f.framework.Logger class overwriting the doLog method. You can
provide this new instance as the felix.log.logger property of the
configuration map.

In addition, I suggest you have an implementation of the OSGi
LogService, which may be based on Log4J -- IIRC the Apache Felix
LogService implementation (log module in the trunk) is based on Log4J.

Beware though: There has been a deadlock problem between the framework
and Log4J classloading in earlier versions of the framework if the
framework's log level (in the Logger class) was set to INFO or DEBUG. I
am not sure, whether this issue has been resolved in the meantime.


View raw message