commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: [HttpClient] Logging entries and exists
Date Mon, 29 Jul 2002 06:19:20 GMT
Jeff,

This is called AOP (aspect-oriented programming), check the AspectJ
website, there is a nice tutorial. It is not java but an extension of
it.

WRT logging, I notice that the wire logs were using the INFO level. I
found that very strange and I would not expect wire logs unless I am
debugging. It will also be bad on performance, don't you think ?

Cheers,
-Vincent

> -----Original Message-----
> From: jsdever [mailto:jsdever] On Behalf Of Jeff Dever
> Sent: 29 July 2002 01:58
> To: Jakarta Commons Developers List
> Subject: Re: [HttpClient] Logging entries and exists
> 
> Hey Vincent,
> 
> The commons-logging facade was initially constructed from the
> httpclient.log
> package, so it was REAL easy to move to commons-logging.   I asked for
> enter(),
> exit() calls but they were refused.  It can be quite tricky dealing
with
> multiple exit points that is typical in exception throwing code, so I
just
> ended
> up puting log.trace("Class.method()") calls in to provide some tracing
at
> least.  Its pretty manual, but the overhead is minimal as it is just
> logging a
> constant string with no reflection or anything fancy.
> 
> Cool, thats some pretty wild programming in cactus, with some syntax I
> haven't
> seen before.    How does the following method definition work?
>     Object around() :
>         !logObjectCalls()
>         && publicMethodsWithParameterCalls()
>         && publicStaticMethodsWithParameterCalls()
>         && !publicMethodsWithReturnValueCalls()
>     {
> 
> Vincent Massol wrote:
> 
> > Hi Jeff,
> >
> > FWIW, in Cactus land, we had decided to go with AspectJ
> > (http://www.aspectj.org) for logging entries and exits of methods.
The
> > downside is that you need to put aspectjrt.jar (80k or so) in user
> > classpaths ...
> >
> > See
> >
http://cvs.apache.org/viewcvs/jakarta-cactus/framework/src/java/share/or
> >
g/apache/cactus/util/log/LogAspect.java?rev=1.3&content-type=text/vnd.vi
> > ewcvs-markup
> >
> > I agree that it is easier to add a jar in an application than in a
> > framework but it's a pity that increasing dependencies on jars is a
> > problem. It should not be in an ideal world ... ;-)
> >
> > Cheers,
> > -Vincent
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message