You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Darrell DeBoer <da...@apache.org> on 2003/02/03 13:26:25 UTC

Re: [VOTE] Discontinue ExcaliburCLI ( was Re: [£EXCALIBUR] cli )

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: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: [VOTE] Discontinue ExcaliburCLI ( was Re: [£EXCALIBUR] cli )

Posted by Peter Donald <pe...@realityforge.org>.
On Mon, 3 Feb 2003 23:26, Darrell DeBoer wrote:
> 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).

Yep. Thats the general conclusion - theres a mail in the archives that I sent 
to Mauro that describes just how to do this.

-- 
Cheers,

Peter Donald
*----------------------------------------------------*
| We must become the change we want to see. - Gandhi |
*----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org