Hi,
I am working with a web application using tomcat5.0.I am using log4j for logging the information in my application.I am keeping log4j.xml out side of the application(Generally we will keep under WEB-INF/classes ).Now I want to load the log4j.xml from outside location in my ContextListner class.I am using the following code.
String cmd="java -cp -Dlog4j.configuration=C:/sample/log4j.xml";
Runtime runtime = Runtime.getRuntime();
Process process = null;
process = runtime.exec(cmd);
but I am getting the following errors.
log4j:WARN File option not set for appender [stdout].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.
log4j:ERROR No output stream or file set for the appender named [stdout].
Feb 26, 2009 7:48:28 PM org.apache.coyote.http11.Http11BaseProtocol start
I am not getting where am I doing wrong.
Any Ideas please?
Regards
kondal