commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sgarlata Matt" <sgarlata_m...@bah.com>
Subject Re: [logging] problem with trace-level logging using log4j
Date Fri, 19 Sep 2003 19:47:43 GMT
LOL yes, thanks Matt.  I feel rather dumb - of course trace doesn't work, it
isn't in
log4j ;)

Matt
----- Original Message ----- 
From: "__matthewHawthorne" <matth@phreaker.net>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Friday, September 19, 2003 3:40 PM
Subject: Re: [logging] problem with trace-level logging using log4j


> I believe that commons-logging's TRACE and DEBUG levels both map to
> log4j's DEBUG level.
>
> Does that help?
>
>
>
>
> Sgarlata Matt wrote:
>
> > I may be missing something here or posting to the wrong list, but for
some
> > reason it seems that trace-level logging doesn't work correctly using
> > commons logging 1.0.3 and log4j 1.2.8.  Sorry this is a long post but I
am
> > trying to give all info needed to diagnose the problem.
> >
> > I have this trace-level statement in my com.bah.krm.core.KrmFactory:
> >
> > if (log.isTraceEnabled())
> > {
> >  log.trace("Retrieving module " + cd + " from database");
> > }
> >
> > This is producing debug-level output, which is curious since I am using
> > trace:
> >
> > DEBUG [Thread-5] (KrmFactory.java:172) - Retrieving module TG from
database
> >
> > Also, when I set my debugging level for this class to debug instead of
> > trace, the message still shows up even though it should not.
> >
> > Here is my commons-logging.properties file:
> >
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> >
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFac
> > toryImpl
> >
> > Here is my log4j.properties file:
> > log4j.rootLogger=error, stdout, R
> >
> > log4j.appender.R=org.apache.log4j.RollingFileAppender
> > log4j.appender.R.File=/example.log
> >
> > log4j.appender.R.MaxFileSize=100KB
> > log4j.appender.R.MaxBackupIndex=1
> >
> > log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > log4j.appender.R.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
> >
> > log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> >
> > log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
> >
> > log4j.logger.com.bah.ebspnp=trace, R
> > log4j.logger.com.bah.krm=trace, R
> >
> > log4j.logger.com.bah.krm.core.KrmFactory=debug, R
> >
> > Any idea what could be wrong?  Thanks,
> >
> > Matt
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message