james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wiederkehr <markus.wiederk...@gmail.com>
Subject Re: Solution
Date Sat, 21 Nov 2009 18:11:18 GMT
On Sat, Nov 21, 2009 at 5:10 AM, Simon Funnell
<simonfunnell@googlemail.com> wrote:
> Hi,
>
> Aspectj is an example of how you could add logging to James components later
> in the inheritance chain. Tools already exist, all you need to do is accept
> this simple fact. If components have explicit logging operations, they are
> flawed. Nothing do with me or anyone, its a just a fact. The solution is to
> write methods without logging code, then add it later with a decent aspect
> orientated framework or the like. Its really that simple.

I think I'm with Norman and Stefano on this.

In my opinion AOP frameworks are great for separating concerns like
transactions or security. They are not so great when it comes to
logging.

Sure, an AOP framework could be used to replace the "trace" log level.
To log each time a method gets invoked, maybe including parameter
values, and each time a method returns, possibly including the return
value. A framework could also take care of logging exceptions as the
are thrown.

But there it ends. IMO a framework cannot provide an easy replacement
for the "debug" and "info" level where you want to log certain states
or events that may be of interest to the user.

So I guess if you want to convince us you have to start posting some
concrete code examples to illustrate what you mean (like Stefano
already suggested).

Regards,
Markus

PS: please don't start a new conversation each time you send a reply.

PPS: I tend to write overly long mails myself (I guess this is an
example) but I really think you should try to be more concise. Nobody
has the time or interest to read one 5k message after the other. I
admit I didn't.

> Are you not bored of explicitly writing logging code in every component?
>
> All I am asking is for you to embrace best practice :) but I respect the
> fact people have jobs as well and that this needs to be accounted for in the
> development cycle.
>
> Regards,
>
> Simon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org

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


Mime
View raw message