On Wed, 27 Nov 2002, Wendy Cameron wrote:
> Date: Wed, 27 Nov 2002 12:06:35 +1000 > From: Wendy Cameron <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: RE: Commons-logging and JDK 1.4 Logger > > Sorry for a late response to this topic, > > But I have just put my commons-logging.properties file in place > and now I scratch my head and wonder: > > 1) How to I create a logger variable in all my classes? The same way Struts 1.1 classes do it would be good :-). import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ... private static Log log = LogFactory.getLog(...); ... > 2) How do I then log messages to the log file etc? The same way Struts 1.1 classes do it would be good :-). if (log.isDebugEnabled()) { log.debug(...); } Use the source ... use the source ... Or (gasp!) the docs: http://jakarta.apache.org/commons/logging/api/ :-) > > Regards Wendy > Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>