avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: No Logging (TM)
Date Mon, 07 Apr 2003 07:27:17 GMT

Didier Villevalois wrote, On 03/04/2003 11.08:
> Nicola Ken Barozzi wrote:

> I see logging like the exposition by the component of its 
> state. 

Excellent description. And that's why AOP is not doing logging. If the 
logger is something that just records method entrances-exits, it's not 
doing logging, because logging is when the components itself decides to 
expose the state, not the way around.


> Most of the time it is error reporting. But there would have use 
> cases where exposition of the component state is about exceptional 
> situtation yet not erroneous. (However it is possible, and many do, to 
> use exception for positive exceptional situations.)

But not correct, I agree.

>> What about a standard JDK java.util.Observer?  
> Yes and EventObjects may be also good candidate. 

But that's only a marker interface, while the other has a method to get 
the thing to observe.

> However IMHO they do 
> not render the instantaneous apparition of such situation.
> The join point reflective object is such a thing in aspect-oriented 
> programming. Thus you may take profit of it for doing logging or what 
> ever thing. You just have to take the appropriate decision depending on 
> what the situation is. This would really decouple. However you certainly 
> find the need to have aspects every time too much coupling.
> Nevertheless, in an aspect, i would use an API to log too. I was 
> thinking of using LogEnabled/Logger pattern. But if such a API exists 
> that is reified as Nicolas suggests it, i would be the first to use it. ;)


My point is that I want to write in the code what I want to say. And 
that I don't need other jars in the classpath for it. And that if nobody 
registers for it, then nothing happens.

>> ...
>>> Does anyone want to help me crisp this up? 
> How can we ??

Imagine using only Java classes for it.
What JDK class/interface should we use as a "logger/monitor"?

> Would like to/could help too.

Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

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

View raw message