Re: log4j and common logging

2010-11-17 Thread Tim Watts
Exactly. As Douglas points out you need to set the rootCategory to INFO. Or, if you want to reduce the chatter from other components (e.g. Spring) and your stuff is in the namespace com.mystuff then leave the root logger alone and add: log4j.logger.com.mystuff=INFO,... On Wed, 2010-11-17 at 16:3

Re: log4j and common logging

2010-11-17 Thread Douglas E Wegscheid
um... aren't you only logging messages of severity on up for most loggers? log4j.rootCategory=ERROR,... how are you creating and using your logger? ■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER (269) 923-5278 // douglas_e_wegsch...@whirlpool.com "A wrong note played hesitatingly is a wrong note. A wr

Re: log4j and common logging

2010-11-17 Thread Henry Lu
Thank for your replying! Here are first several lines: log4j: Trying to find [log4j.xml] using context classloader EnvironmentClassLoader[web-app:http://localhost:8080]. log4j: Trying to find [log4j.xml] using sun.misc.launcher$appclassloa...@11b86e7 class loader. log4j: Trying to find [log4j.

Re: log4j and common logging

2010-11-17 Thread Tim Watts
What does running the program with -Dlog4j.debug tell you? Stderr should show what config file, if any, it's using. On Wed, 2010-11-17 at 14:36 -0500, Henry Lu wrote: > I tried to switch from log4j to org.apache.commons.logging.Log + log4j. > I my code, I have: > > import org.apache.commons.log

log4j and common logging

2010-11-17 Thread Henry Lu
I tried to switch from log4j to org.apache.commons.logging.Log + log4j. I my code, I have: import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ... public class XYZ { static Log log = LogFactory.getLog("Xyz"); ... } and I am using the existing log4j.property