commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Probst" <andpr...@gmx.net>
Subject [logging] LogConfigurationException
Date Sun, 01 Jun 2003 16:42:27 GMT
Hi all,

I'm trying to use commons-logging together with log4j.

Do I have to initialise log4j, i.e. load the log4j.properties? I 
don't think so. If I have to configure it myself, I'm tied to 
log4j. Then I could use it directly.

At the moment I get 

Caused by: org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: Class o
g.apache.commons.logging.impl.Log4JLogger does not implement Log
        at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFac
toryImpl.java:532)
        at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFac
toryImpl.java:272)
        at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFac
toryImpl.java:246)
        at 
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)

I put the following code into my class:

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
static Log logger = LogFactory.getLog(AllTests.class); 

Isn't this enough?

Mime
View raw message