commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Sitze <>
Subject RE: Issues with logging
Date Mon, 30 Sep 2002 16:23:43 GMT
Please open a defect in Bugzilla for this.

Richard A. Sitze
IBM WebSphere WebServices Development

 This issue has already been raised long time back under the subject 
"Support for JDK1.4 Logger in Commons Package". It was told that time that 
it will be fixed. But the fix has not happened yet. Hope it is resolved 


-----Original Message-----
From: Giacomo Pati []
Sent: 30 September 2002 16:47
Subject: Issues with logging

Hi all

We've dicovered an issue with the current commons-logging code (1.0.2).

We have a servlet depoyed into a Servlet engine which has a log4j.jar in
its common classpath but our servlet (using commons-logging) need to used
logkit. We tried to use the system property
"org.apache.commons.logging.Log" set to
"org.apache.commons.logging.impl.LogKitLogger" as suggested with no luck.

So, we looked into the code and found that the constructor of
org.apache.commons.logging.impl.LogFactoryImpl is doing the following:

    public LogFactoryImpl() {

and the guessConfig does:

    protected void guessConfig() {
        if( isLog4JAvailable() ) {
            proxyFactory = null;
            try {
                Class proxyClass=
"org.apache.commons.logging.impl.Log4jFactory" );
                if (proxyClass != null) {
                    proxyFactory = (LogFactory)proxyClass.newInstance();
            } catch( Throwable t ) {
                ; // ignore
        // other logger specific initialization
        // ...

Admittedly if have no idea what the proxyFactory is used for but for us
this means commons-logging does not respect the system property suggested
to use any other logging kit if there is a log4j in the classpath

Is this intentional?

By commenting the 'guessConfig()' call from the constructor we could solve
our problems but I'd really like to hear your oppinions about it.



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

This message, together with any attachments, is
confidential and is intended only for the use of
the addressee(s) and may contain information
which is covered by legal, professional or other
privilege. If you are not the intended recipient,
please destroy this E-mail and inform us.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message