commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Dever <jsde...@sympatico.ca>
Subject Re: [HttpClient] Logging entries and exists
Date Mon, 29 Jul 2002 00:57:56 GMT
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>


Mime
View raw message