Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to add log4j.xml to RAP-Application classpath
How to add log4j.xml to RAP-Application classpath [message #135494] Mon, 08 June 2009 12:20 Go to next message
p-lex is currently offline p-lexFriend
Messages: 18
Registered: July 2009
Junior Member
Hello,

I want to use log4j in my RAP application. The plugin that contains the
log4j libs provides factories for creating logger instances. These loggers
are used in other plugins. I can put a log4j.xml in the classpath of this
plugin - this works fine. But this plugin is used in an other application,
too. So I have to use an external log4j.xml-file.

In a RCP-application I use an entry for declaring the path to the
log4j.xml:
log4j.configuration=file:configuration/log4j.xml

The configuration directory contains the log4j.xml and so its easy to
change the configuration before starting the application.

If I add that entry to the config.ini of the RAP-application this
parameter is not passed to the jvm. I tried to declare it in the
launch.ini, too.

What is the best way to bind an external log4j configuration file?

best regards,

p-lex
Re: How to add log4j.xml to RAP-Application classpath [message #135862 is a reply to message #135494] Fri, 12 June 2009 09:48 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
p-lex,

did you search the Equinox newsgroup for an answer? Several log4j
issues have been discussed there.

If you just need a replacement RCP way of specifying the
configuration, then search the web for "log4j.configuration web.xml".

HTH
Rüdiger

p-lex wrote:
> Hello,
>
> I want to use log4j in my RAP application. The plugin that contains the
> log4j libs provides factories for creating logger instances. These
> loggers are used in other plugins. I can put a log4j.xml in the
> classpath of this plugin - this works fine. But this plugin is used in
> an other application, too. So I have to use an external log4j.xml-file.
>
> In a RCP-application I use an entry for declaring the path to the
> log4j.xml:
> log4j.configuration=file:configuration/log4j.xml
>
> The configuration directory contains the log4j.xml and so its easy to
> change the configuration before starting the application.
>
> If I add that entry to the config.ini of the RAP-application this
> parameter is not passed to the jvm. I tried to declare it in the
> launch.ini, too.
>
> What is the best way to bind an external log4j configuration file?
>
> best regards,
>
> p-lex
>
Re: How to add log4j.xml to RAP-Application classpath [message #521361 is a reply to message #135494] Wed, 17 March 2010 12:21 Go to previous messageGo to next message
zabi is currently offline zabiFriend
Messages: 11
Registered: July 2009
Junior Member
Hi,
did you get a solution for your problem? if yes can you tell me how you did it. because i have the same problem. i try to integrate log4j in my rap application deployed as war file on jboss.

Thanks.
Re: How to add log4j.xml to RAP-Application classpath [message #521563 is a reply to message #135494] Thu, 18 March 2010 03:16 Go to previous message
Cheney  is currently offline Cheney Friend
Messages: 12
Registered: March 2010
Junior Member
Hi,

May be you can consider to use pax logging to solve your problem,see [1].

[1] http://www.eclipse.org/forums/index.php?t=msg&&th=16 4627&goto=521363#msg_521363

Best Regards,
Cheney

> Hello,
>
> I want to use log4j in my RAP application. The plugin that contains the
> log4j libs provides factories for creating logger instances. These
> loggers are used in other plugins. I can put a log4j.xml in the
> classpath of this plugin - this works fine. But this plugin is used in
> an other application, too. So I have to use an external log4j.xml-file.
>
> In a RCP-application I use an entry for declaring the path to the
> log4j.xml:
> log4j.configuration=file:configuration/log4j.xml
>
> The configuration directory contains the log4j.xml and so its easy to
> change the configuration before starting the application.
>
> If I add that entry to the config.ini of the RAP-application this
> parameter is not passed to the jvm. I tried to declare it in the
> launch.ini, too.
>
> What is the best way to bind an external log4j configuration file?
>
> best regards,
>
> p-lex
>
Previous Topic:RWT Test Dependencies
Next Topic:To the RAP Team: when are planned fixing bug 219465 ?
Goto Forum:
  


Current Time: Wed Dec 01 10:23:54 GMT 2021

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

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

Back to the top