incubator-yoko-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: logging
Date Mon, 13 Mar 2006 19:49:29 GMT
On Mar 13, 2006, at 11:37 AM, Geir Magnusson Jr wrote:

> Dain Sundstrom wrote:
>> I think projects should avoid logging entirely.  The problem with  
>> logging is the information that comes out of it is useless to  
>> other software because it is encoded into user readable strings.   
>> IMHO, the best policy is to use a Monitor.  For example see the  
>> following XBean Monitors:
>> http://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-kernel/ 
>> src/main/java/org/apache/xbean/kernel/ServiceMonitor.javahttp:// 
>> svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-kernel/src/ 
>> main/java/org/apache/xbean/kernel/KernelMonitor.java
>
> I think projects should avoid logging too.  (I'm still hoping  
> someone tells me how the orb in Sun's J2SE logs... :)
>
> Question about the monitors.... I'm curious -  why didn't you  
> generalize so that you could add more events as needed w/o breaking  
> client software?

Well, I'm actually not too worried about breaking client software  
that is monitoring the kernel.  For most uses, I expect a user  
outside of the xbean project to simply write bridges using the  
monitor, which simply convert the monitor event into an event object  
specific to another system.  For example a Log4JKernel monitor, would  
convert a kernel monitor event into a log4j log event.  So if we add  
stuff in the future it would not be a big deal for the owner of that  
monitor to write another version.  If we decided to make drastic  
changes, we could simply create another interface and perform the  
wrapping inside of the kernel.

Anyway, what did you have in mind by the term "generalize"?

-dain

Mime
View raw message