How to log independently of other webapps using log4j? Also, reading from log file from within serv

U

unomystEz

Hi all,

I have 3 webapps that i package and deploy as a war file. I plan on
supporting tomcat, resin, jetty and orion. I believe resin uses
jdk-logging, tomcat uses commons-logging. afaik, with tomcat, I can
put log4j.jar in common/lib and log4j.properties in common/classes and
it will output my applications logging (which is log4j) to that the
tomcat/logs directory. Since I may have multiple deployments of the
same app, I don't want the logs to be interlaced. Is it possible to
setup log4j in a way so that each webapp has it's own log4j.properties
file and logs independently of each other?

Also, I would also be interested in knowing if it's possible to read
the log file from within the servlet as I would like to see whats going
on from a webbrowser (in case an error was thrown, etc..). Maybe I
should post this as another subject.

thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top