Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Orbit » Apache Commons Logging and Log4J
Apache Commons Logging and Log4J [message #10441] Wed, 19 September 2007 09:16 Go to next message
Eclipse UserFriend
Originally posted by: stefan.bley.dd.gmx.de

Hi folks,

In my Eclipse plugins I use openArchitectureWare from the Eclipse Generative
Modeling Tools which itself uses Apache Commons Logging and Log4J from your
bundles.

The problem is that when I'm running my plugins through Run As -> Eclipse
Application, all logging is done by JDK Logger instead of Log4J. This is
done because org.apache.commons.logging can not find org.apache.log4j since
it does not depend on it and thus does not have it in the classpath.

I guess to solve the problem you should make use of the manifest property
"BuddyPolicy" to extend Apache Common's classpath at runtime.

org.apache.commons.logging.jar/META-INF/manifest.mf should contain:
Eclipse-BuddyPolicy: registered

and org.apache.log4j/META-INF/manifest.mf should contain:
Eclipse-RegisterBuddy: org.apache.commons.logging

It would be nice if you could make this work.
Regards,
Stefan
Re: Apache Commons Logging and Log4J [message #10473 is a reply to message #10441] Wed, 19 September 2007 23:47 Go to previous message
David Williams is currently offline David WilliamsFriend
Messages: 722
Registered: July 2009
Senior Member
On Wed, 19 Sep 2007 05:16:33 -0400, Stefan Bley <stefan.bley.dd@gmx.de> =
wrote:

>
> I guess to solve the problem you should make use of the manifest prope=
rty
> "BuddyPolicy" to extend Apache Common's classpath at runtime.
>

Yes, this has been requested before, but ... this solution doesn't work =
well for a fully participatory install/IDE where there might be more tha=
n one plugin wanting to do the logging, so we decided not to do it at al=
l.

If you are in that situation, where you have an App and you know you are=
only one providing the logging, then perhaps you could provide your own=
version?

See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D181813
and it's dup for some initial discussion.

From what I heard, someone "was looking into a solution for 3.4" ... bu=
t, not sure who or where that stands.
Re: Apache Commons Logging and Log4J [message #562819 is a reply to message #10441] Wed, 19 September 2007 23:47 Go to previous message
David Williams is currently offline David WilliamsFriend
Messages: 722
Registered: July 2009
Senior Member
On Wed, 19 Sep 2007 05:16:33 -0400, Stefan Bley <stefan.bley.dd@gmx.de> =
wrote:

>
> I guess to solve the problem you should make use of the manifest prope=
rty
> "BuddyPolicy" to extend Apache Common's classpath at runtime.
>

Yes, this has been requested before, but ... this solution doesn't work =
well for a fully participatory install/IDE where there might be more tha=
n one plugin wanting to do the logging, so we decided not to do it at al=
l.

If you are in that situation, where you have an App and you know you are=
only one providing the logging, then perhaps you could provide your own=
version?

See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D181813
and it's dup for some initial discussion.

From what I heard, someone "was looking into a solution for 3.4" ... bu=
t, not sure who or where that stands.
Previous Topic:Apache Commons Logging and Log4J
Next Topic:orbit cvs repository
Goto Forum:
  


Current Time: Sat Apr 20 03:46:21 GMT 2024

Powered by FUDForum. Page generated in 0.02852 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top