Ok,
This will be workaround too (It is no the best way to detect the best class
loader):

1. Add methods with ClassLoader parameter.
2  use class app classloader if we have class, but no classloader parameter:
    public static Log getLog(Class clazz)
        throws LogConfigurationException {

        return (getFactory(clazz.getClassLoader()).getInstance(clazz));

3. heurystics in context getContextClassLoader :

 It must find the most specific classLoader for application,
 getContextClassLoaders returns list of class loader ordered by priority:

   workaround 1, try to find not system class loader in caller stack
   workaround 2, try to find not system class loader in ThreadContext
   workaround 3, try to find not system class loader for logging class
   workaround 4  add system class loader to the end of list.

4. iterate list of class loaders and try to find first possible
resource/class.
It is very depends on loader order returned list. it can be configurable, I
do not believe it is possible to
decide on the best order.



>
>
> On Wed, 26 Feb 2003, Juozas Baliuka wrote:
>
> >
> > It is not my opinion about logging, but this problem exists and reported
a
> > few times for logging and lang
> > (possible it nothing about this in bugzilla). Some solutions were
> > proposed a few months ago too.
> >
> > I have "karma" on commons, but as I understand I need to ask active
> > commiters before to add myself to status.html  and commit something.
> > Do I need to submit diff files and wait for response first ?
>
> I imagine the best thing to do would be to drive discussion on it and
> volunteer to implement the solution. I'm not sure if there's any hard and
> fast rule about adding yourself to a status.html, but for a design/major
> change as this would be, I'd definitely expect the person involved to be
> discussing the problem first.
>
> Or solve it in a sandbox, and then broach the discussion before
> committing.
>
> For something like a typo fix, or making a broken Test case work, I think
> any Commons committer ought to be able to hop in and make the fix, leaving
> a note on the window-sill.
>
> Hen
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to