I try to use commons-logging in JBoss-4.0.1sp1 with log4j :

In my web-app gsmstats, I have the jboss-web.xml file in the WEB-INF directory :

<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
gsmstats:loader=gsmstats.war
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>

I have a commons-logging.properties file in WEB-INF/classes :

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger 

I have also the log4j.properties file in WEB-INF/classes :

log4j.logger.com.cwsoft=DEBUG, A1, dailyHtmlLog
log4j.category.org.apache=DEBUG,A1, frameworksLog
log4j.category.org.hibernate=DEBUG,A1, frameworksLog
log4j.category.org.springframework=DEBUG,A1, frameworksLog
log4j.category.com.sun.faces=DEBUG,A1, frameworksLog

# A1 = ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d %r ms %-5p %c %x - %m%n
.....

I my application, I use the commons-logging API to print logs :

if (LogFactory.getLog(this.getClass()).isDebugEnabled()) {
        LogFactory.getLog(this.getClass()).debug("setSubscriberServiceCommons");


but I have no logs.

When I use the log4j API to print logs, it works fine ! :

if (Logger.getLogger(this.getClass()).isDebugEnabled()) {
        Logger.getLogger(this.getClass()).debug("setSubscriberServiceLog4j");
                }

I want to use the commons-logging API.

Is somebody have an idea of what is the problem ?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3908480#3908480

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3908480


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to