How can I specify a common location for LOG4J log files running under different servers?

K

Kent Lichty

We have a modest web application and are using Log4J for logging. Our
standard Web Server is Tomcat, so in our log4j.properties file we have
this entry to specify where the log file is to be created:

log4j.appender.logfile.File=${catalina.home}\\logs\\OurLogName.log

This works fine for Tomcat, but we also want to be able to install the
application on WebSphere with minimal user intervention. So, the above
line causes a problem because there is probably no catalina.home
environment variable and even if there were it probably points to some
non-existent directory.

Again, we would like to be able to install the application on
WebSphere without forcing the user to change the log4j.properties file
to tell us where to put the log file. WebSphere does have a "logs"
directory, but its on a different level than the Tomcat "logs"
directory.

I would like to know how other people have addressed this same
problem. Thanks for your help.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top