On Sun, 2 Feb 2003 09:00, Paul Hammant wrote:
> Stephen,
>
> >> The build file refers to Commons Logging... though I am not sure if
> >> the java code does...
> >
> > There are no references to commons logging in the build or test
> > sources in Common CLI.  I figure this is just an error in the buildfile.
>
> It does raise an interesting point though : we sit here _petrified_ that
> they might put in a dependancy to commons-logging at the drop of a hat.
>
> See
> http://cvs.apache.org/viewcvs.cgi/jakarta-commons-sandbox/attributes/src/ja
>va/org/apache/commons/attributes/Attributes.java (v1.3) for trivial use of
> logging :
>
>     } catch (Exception e) {
>        logger.warn("failed to initialize specified implementation " +
>                "of AttributeFinder, using default", e);
>     }
>
> At any moment, any Commons package may use commons-logging.
> They just do not understand how we want instance-capable logging
> rather than term/class level logging.
>

I've been wondering lately about how hard it would be to provide a 
Commons-Logging LogFactory implementation, which permits true IoC and 
instance-capable logging in avalon, but is comaptible with Commons-Logging 
code. It seems to me that commons-logging isn't going away, so we need to 
tame it...

You could either use an interceptor on static method calls (AOP-ish), or maybe 
something as simple as a LogFactory which always grabs a Logger from a 
ThreadLocal, which would be set up by the container when it passes calls to a 
component (which is also AOP-ish, I guess).

I haven't tried this out, or given it that much thought - but I find it hard 
to believe that you gurus haven't ;).

-- 
cheers,
Darrell DeBoer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to