Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Setting up Log4j in Jetty Web application

Can anybody please tell me how to setup log4j in jetty web application PU? I need to place an external log file and log the messages. Where should I place the log4j jar and log4j.xml or log4j.properties file?

Thanks,

Abhilash

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3247]{quote}

asked 2009-09-19 11:14:03 -0500

abhilash428 gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

The log4j jar should be part of the lib folder of the PU jar.
You can also place such third party libraries within the \gigaspaces-xap-premium-7.0.1-ga\lib\optional\pu-common folder. This will avoid the need to bundle these with the PU jar/war and will shorten the deployment time.

The log4j.xml or log4j.properties file should be placed at the lib folder within a jar file.

Shay

answered 2009-09-20 05:59:30 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

I am using Logback which uses a logback.xml file for the configuration.. I tried your suggestion as far as the jar file. It does not pick-up the configuration file. Any idea where this should go ?

croffler gravatar imagecroffler ( 2009-10-22 08:50:17 -0500 )edit

Never mind .... it works

croffler gravatar imagecroffler ( 2009-10-22 09:51:07 -0500 )edit

Which option works for you?
Shay

shay hassidim gravatar imageshay hassidim ( 2009-10-22 20:20:01 -0500 )edit

The logback.xml file placed at the lib folder within a jar file.

croffler gravatar imagecroffler ( 2009-10-26 16:06:59 -0500 )edit

Can you be specific about which jar the log4j.properties (or logback.xml) file should be placed in? We have tried putting it in the /lib directory of a PU that we then deployed, but it didn't work.

David

dsmain gravatar imagedsmain ( 2009-11-03 15:58:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2009-09-19 11:14:03 -0500

Seen: 2,044 times

Last updated: Sep 20 '09