Hello:
I'm trying to use Log4j in my servlets but I couldn't get it to work. I've checked in
the archive, and there's an example for Tomcat but not Websphere.
This is my Log4J init class. This class is set to "Load at Startup" in Websphere
Appserver.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.log4j.PropertyConfigurator;
public class Log4jInit extends HttpServlet {
public void init() throws ServletException {
PropertyConfigurator.configure("log4j.properties");
}
}
--------
This is my log4j.properties file
# Set root category priority to ERROR and its only appender to R.
log4j.rootCategory=error, R
# R is set to be a RollingFileAppender.
log4j.appender.R=org.apache.log4j.RollingFileAppender
# set up the filename - change as appropriate
log4j.appender.R.File=error.log
# R uses PatternLayout.
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %c - %m%n
---------
Any help will be greatly appreciated.
Thanh Nguyen
[EMAIL PROTECTED]
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html