On Thu, 2004-05-13 at 06:35, Alex Karasulu wrote:
> > From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> >
> >
> 
> No I have not but I don't think an extra call is going to make 
> or break an application.  Again everyone has valid concerns 
> about the approach and it may not be the best fit but worth 
> considering.
> 
> > Are we making a mountain out of a mole hill? ;)
> 
> Maybe as I'm beginning to see.

The "monitor" or "callback" or "observer" pattern is a good solution for
many problems. However it only has a very small overlap with "logging".

Alex's initial post, and the contents of the web page he references,
gave me the impression that he was suggesting the observer pattern (or
"monitor") as a replacement for direct calls to commons-logging in most
or all cases, which is clearly wrong as it would result in a huge
explosion of interfaces and method calls.

There may be *some* situations in commons where logging is used and an
observer pattern would be more appropriate. Using an observer pattern
does give an application the ability to respond to events, or provide
context for log messages, which direct calls to commons-logging don't.
However the overhead for this feature can be large, so I think it must
be used sparingly.

When designing the basic interfaces for an IOC framework, defining
appropriate observer functionality seems like a very good idea. So I am
not criticising the general concept described by Alex, but do believe
strongly that "logging" is quite a different tool, and one cannot
replace the other. 

I do hope this thread is now over...

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to