RE: Has any one used struts and log4j successfully?

2001-03-06 Thread Martin J. La Jeunesse
I had a little trouble using PropertyConfigurator.configure() to log to a file: I wasn't exactly sure where to put the .lcf file so that servlets could find it. I ended-up coding an absolute location. I kind-of thought it should go in the application directory under WEBAPPS or in the application

Re: Has any one used struts and log4j successfully?

2001-02-28 Thread Craig R. McClanahan
Mark Balster wrote: FileInputStream inFile = new FileInputStream(getServletContext().getRealPath(messages.getMessage("Log.Pro pertiesFile")) ); You should also be aware that this will only work if your servlet container unpacks your web application into an open directory

Re: Has any one used struts and log4j successfully?

2001-02-28 Thread Thierry Cools
What's your problem actually ? I tried to use Log4 in my project using struts as well and I didn't get any, I just out my 'log4j.properties'in the classpath and put some 'Category' variables in my codelike this public class ListBillerAction extends ActionBase { private static Category cat

Re: Has any one used struts and log4j successfully?

2001-02-27 Thread Mark Balster
I currently use Log4j with NDC enabled combined with struts. Here is how I use it: - Run PropertyConfigurator from a startup servlet - import org.apache.log4j.Category in your code - set reference to log4j in your code public class loginAction extends Action { static Category cat =

Re: Has any one used struts and log4j successfully?

2001-02-27 Thread Puneet Vardhan
Hi, Is there anyway that I could prevent the call to getInstance of Category in every action class. So I can have instance of Category in base action class and every other class would extend from it. public class baseAction extends Action { static Category cat =

RE: Has any one used struts and log4j successfully?

2001-02-27 Thread Martin J. La Jeunesse
I had a little trouble using PropertyConfigurator.configure() to log to a file: I wasn't exactly sure where to put the .lcf file so that servlets could find it. I ended-up coding an absolute location. I kind-of thought it should go in the application directory under WEBAPPS or in the application

Re: Has any one used struts and log4j successfully?

2001-02-27 Thread Mark Balster
ntln(io.getMessage()); } - Original Message - From: "Martin J. La Jeunesse" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 27, 2001 3:57 PM Subject: RE: Has any one used struts and log4j successfully? I had a little trouble using PropertyConfigurato