You don't need this line of code at all! Log4J automatically searches for
your log4j.properties.

But, as general practice, try avoiding getRealPath... to get java.io.File,
use getServletContext().getResourceAsStream instead.

-----Original Message-----
From: Jim Lynch [mailto:[EMAIL PROTECTED] 
Sent: June 23, 2003 12:01 PM
To: tomcat
Subject: Logging via log4j and war file question

I recently switch from doing "install", "remove" deployments via a build
directory to "deploy", "undeploy" via a war file.  Unfortuantely my
logging has stopped working.  I've traced it to the following statement:

PropertyConfigurator.configure(getServletContext().getRealPath("/")+"/WEB-IN
F/classes/log4j.properties");

It appears the getRealPath method doesn't work with war files, so I'm a
bit stuck.  How can I configure my logging from a file within the war
file, or can I? 

Thanks,
Jim.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to