O
Ole Christian Langfjaeran
Closing in on a serious hearloss soon with this problem. According to http://logging.apache.org/log4j/docs/manual.html :
"... you should place the log4j.properties under the WEB-INF/classes
directory of your web-applications. Log4j will find the properties file and initialize itself. This is easy to do and it works."
Well. Doesn't work for me, and I've restarted Tomcat 5.5 so much I can do
it blindfolded soon. Yes, I've installed commons-loggin.jar and
log4-1.2.9.jar in WEB-INF/lib. All logs are still written to
stderr_xxxx.log and no formatting is gathered from the properties file. I
wonder...
my code:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class HandleReportServlet extends HttpServlet{
private static Log logger = LogFactory.getLog(HandleReportServlet.class);
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException {
logger.warn("Got request");
}
}
Ole C.
"... you should place the log4j.properties under the WEB-INF/classes
directory of your web-applications. Log4j will find the properties file and initialize itself. This is easy to do and it works."
Well. Doesn't work for me, and I've restarted Tomcat 5.5 so much I can do
it blindfolded soon. Yes, I've installed commons-loggin.jar and
log4-1.2.9.jar in WEB-INF/lib. All logs are still written to
stderr_xxxx.log and no formatting is gathered from the properties file. I
wonder...
my code:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class HandleReportServlet extends HttpServlet{
private static Log logger = LogFactory.getLog(HandleReportServlet.class);
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException {
logger.warn("Got request");
}
}
Ole C.