RE: Generating logs w/Log4J in ActionClass

2003-08-24 Thread Kapadia Mitesh-C23457
Thanks Navjot - Quick question -- are you sure the .properties file must be in your classpath? -Original Message- From: Navjot Singh [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2003 10:10 AM To: Struts Users Mailing List Subject: RE: Generating logs w/Log4J in ActionClass i

RE: Generating logs w/Log4J in ActionClass

2003-08-22 Thread Mike Jasnowski
In your action class, retrieve your log instance Log LOG = LogFactory.getLog(YourAction.class); Then wherever you need to log: if (LOG.isDebugEnabled()) { LOG.debug(Log your debug msg here); } Replace isDebugEnabled() with whatever level you want to use. HTH, Mike J

RE: Generating logs w/Log4J in ActionClass

2003-08-22 Thread Mike Jasnowski
Sorry, this is with commons logging not log4j specifically -Original Message- From: Mike Jasnowski [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2003 9:29 AM To: Struts Users Mailing List Subject: RE: Generating logs w/Log4J in ActionClass In your action class, retrieve your log

Re: Generating logs w/Log4J in ActionClass

2003-08-22 Thread David Stemm
: MyLogger.debug(Message, this.getClass().getName()); Hope that helps. - Original Message - From: Mike Jasnowski [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 22, 2003 8:33 AM Subject: RE: Generating logs w/Log4J in ActionClass Sorry

RE: Generating logs w/Log4J in ActionClass

2003-08-22 Thread Navjot Singh
i just vaguely remember private Logger logger = Logger.getLogger(Test.class); logger.debug(Better Check log4j docs); and keep the log4j.properties file in classpath. hth navjot singh |-Original Message- |From: Kapadia Mitesh-C23457 [mailto:[EMAIL PROTECTED] |Sent: Thursday, August 21,

RE: Generating logs w/Log4J in ActionClass

2003-08-22 Thread Kapadia Mitesh-C23457
Thanks David. Quick question -- do I just have the listed method you provided in my wrapper class? -Original Message- From: David Stemm [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2003 8:56 AM To: Struts Users Mailing List Subject: Re: Generating logs w/Log4J in ActionClass I

Re: Generating logs w/Log4J in ActionClass

2003-08-22 Thread David Stemm
I have methods for debug, info, warn and error. Attached is a sample class I use. - Original Message - From: Kapadia Mitesh-C23457 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 22, 2003 11:08 AM Subject: RE: Generating logs w/Log4J in ActionClass

Re: Generating logs w/Log4J in ActionClass

2003-08-22 Thread Pedro Emanuel de Castro Faria Salgado
I have the appropriate configurations completed to use Log4J w/Tomcat. However, how would I invoke Log4J from within my action class to generate DEBUG statements? I have the following package imported: import org.apache.log4j.*; Any examples would be most appreciated. Thanks in advance. -