I had log4j-1.1b7, but I just looked in 1.1.1 and it is the same code.
It is found in the method :
static
public
URL getResource(String resource, Class clazz) {
Dan
-----Original Message-----
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 4:02 PM
To: LOG4J Developers Mailing List
Subject: Re: Loader class
Dan,
Which version of log4j is this? Are you looking at log4j 1.1.1? Ceki
At 14:43 22.05.2001 -0400, you wrote:
>In the 0.9.1 version of log4j, the ClassLoader was retrieved via:
> ClassLoader loader = org.log4j.Category.class.getClassLoader();
>now it is retrieved like this:
> ClassLoader loader = clazz.getClassLoader();
>
>This allowed the log4j.properties file to be found anywhere in the
>classpath.
>
>It seems that the ClassLoader object can only be retrieved from a
static
>initiazation block of a class that is currently being loaded.
>
>For example: If we are in class A, and do:
> ClassLoader loader = A.class.getClassLoader(); it works
>but if we use any other class:
> ClassLoader loader = B.class.getClassLoader(); it does not work
>(returns null)
>
>So can the line:
> ClassLoader loader = clazz.getClassLoader();
>be changed to:
> ClassLoader loader = ClassLoader.class.getClassLoader();
>in some future version of log4j?
>
>Dan
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
--
Ceki Gülcü
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]