How to Enable Log4j in Struts
843836Jul 15 2004 — edited May 17 2008Hi,
I have a struts application and I need to implement a logger for it. I would like to use Log4j but am having problems initializing it.
Because I am using struts, I do no have access to the Action servlet and so cannot place the intiializing code in the servlets init() method.
Is there a way of using the struts-confix.xml file to enable Log4j logging ?
Basically I need the application to load up the log4j.properties file using
PropertyConfiguratior.configure("log4j.properties");
But how do I do this in Struts ??
thanks
Paul