Hi,
 reading this thread on the Spring DM forum [1] reminded me of the
"logging madness" (commons, log4j, slf4, slf4j bridges, ...) that
everybody starting with Felix and OSGi (and JaveEE, nowadays) will
eventually find.

In brief the problem is the base API of slf4j is a bundle, but
implementations like lf4j-log4j12 are bundle fragments with
import/export, therefore currently not supported by Felix.
These prevents newbies to run, f.i., Spring DM out of the box,
confusion, and maybe migrating to other osgi containers. Of course
there are many simple solutions to this problem, but I think it would
be nice to provide some FAQ/precooked solution for everybody.

So the question is: what do you use? What's the best option?

- in my case, I have osgi-fied slf4 with the log4j binding with the
maven osgi plugin.   Maybe a candidate for felix commons?

- does such a bundle already exist anywhere, so we can point user to
that bundle?

- I actually noticed that if I remove the Fragment-Host property in
the lf4j-log4j12.jar everything seems to work. Such property was added
to make it work with Equinox (bug 73 [2]) due to a dependency cycle
between the api and the impl.
However, removing the fragmeng-host, Felix doesn't complain


[1] http://forum.springsource.org/showthread.php?t=70639
[2] http://bugzilla.slf4j.org/show_bug.cgi?id=73
-- 
Filippo Diotalevi

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to