To simply make log4j a bundle this probably works. The problem is though that log4j has some more issues when being used in OSGi.

The configuration of log4j works with a log4j.properties file that it tries to resolve using the classloader. So some recommendations were to use a fragment bundle to give this config to log4j. This is far fom ideal as the config is then statically defined in a jar.

In OSGi the recommended way of doing configuration is to use the config admin service. This is a much bigger change though. Fortunately there is already a nice solution in form of pax logging which can use log4j as front end and also as backend. So I am not sure if you have to fix the config issue.

So I think making log4j a bundle is a good step but probably not enough to make it work nicely in OSGi.

Christian


Am 30.05.2012 13:36, schrieb Christian Grobmeier:
Dear Felix devs,

I am one of the log4j developers. Recently I looked into some bugs we
have: they are all related to Felix and OSGI. We just made something
wrong and I am honest, I have no clue about OSGI. Today Julien
Vermillard told me you are providing a bundle for log4j:

http://svn.apache.org/repos/asf/felix/trunk/commons/log4j/pom.xml

I am so what pleased!

Now I would like to take your work and use it in our build. Or point
to your location. I think option 1 is preferred by our users, and so I
want to know if you can assist me with stealing your code :-)

Basically I just need to take the configuration provided by the pom
above and put it into our pom.xml - right?

cheers
Christian




--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


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

Reply via email to