commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Berlin <sber...@limepeer.com>
Subject Re: [Logging] Using Commons Logging With JDK 1.1
Date Tue, 04 Nov 2003 19:47:54 GMT
FYI, our need is more of a "it has to exist without erroring" on 1.1.8 
as opposed to "it has to run and log useful information".  I was able to 
hack this into the source by adding two constants into LogFactory:

    private static final boolean JAVA_118 =
        
System.getProperties().getProperty("java.version").startsWith("1.1.8");
       
    private static final Log EMPTY_LOG =
        new org.apache.commons.logging.impl.EmptyLogger();    // a new 
class i added that does basically nothing

and in the LogFactory.getLog() method checking JAVA_118 and returning 
EMPTY_LOG.  I had attempted all sorts of other maneuvers, such as 
creating a new 'Action' interface, adding a new runPrivileged method, 
and only doing the contents of the Action within a PrivilegedAction if 
the runtime wasn't 1.1.8 -- but for whatever reason, the classloaders on 
Mac Classic refused to allow that to work, insisting that the anonymous 
PrivilegedAction class be loaded (causing a NoClassDefFoundError).

Thanks,
 Sam

John Keyes wrote:

> Sam you're asking in the right place alright.  One of the 'Logging' 
> people
> should pick up on this soon and post a reply.
>
> -John K
>
> On 4 Nov 2003, at 15:57, Sam Berlin wrote:
>
>> Is there perhaps another place I should be asking this question?
>>
>> Thanks,
>> Sam
>>
>> Sam Berlin wrote:
>>
>>> Helllo Everyone,
>>>
>>> I am attempting to incorporate commons-logging into LimeWire 
>>> (www.limewire.org).  We support Mac Classic, and thus must support 
>>> Java 1.1.8.  It appears as though the commons-logging requires 
>>> Java2, despite comments in the code that reference 1.1 support (such 
>>> as the catching of NoSuchMethodException within 
>>> LogFactory.getContextClassLoader).  The depenency on 1.2 is because 
>>> of the use of java.security.PrivilegedAction and 
>>> java.security.AccessController in multiple classes.
>>>
>>> Is the Java2 requirement an oversight, or by design?  Is there a 
>>> fork somewhere that supports 1.1.8?
>>>
>>> Thank you in advance, and my apologies for asking a question 
>>> immediately after joining the list.
>>>
>>> Thanks,
>>>  Sam
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>
>
> ---------------------------------------------------------------------
> 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