Hi,

I would like to make the LogEnable interface used throughout the ECM. I 
realize that the Loggable interface needs to be supported for components 
hosted in ECM but I believe this can be achieved via the following steps;

* Make all component.* extend AbstractLogEnabled rather than AbstractLoggable
* Make all component.* implement Loggable and cache the LogKit logger if 
supplied
* if a LogKit Logger is requested by a hosted component and the ECM was not 
supplied with a LogKit logger then it 
   - creates LogKit logger
   - creates and applys LogKit LogTarget that redirects to framework Logger
   - Pass this new LogKit Logger to hosted component

The effects of this are as follows;

* If you are a normal "user" of ECM and you have no hosted components that are 
Loggable then there is zero effect
* If you are a normal "user" of ECM and you have hosted components that are 
Loggable and you originally supply a LogKit Logger then there is zero effect
* If you are a normal "user" of ECM and you have hosted components that are 
Loggable and you dont supply a LogKit Logger then there is a slight overhead 
to Logging

The one possible ugly of this is that if anyone extended any of the components 
of ECM and they used the Logger in non-standard ways then it may break. 
However given the structure I believe that the Handlers and factory will 
never be subclassed. 

So the only possible breakage occurs with people who subclass ECM and do more 
than just Log with LogKit logger. So is this a likely scenario?

Just in case your wondering why I am motivated to do this it is because I want 
to remove last bits of LogKit dependency from Phoenixs API layer. However 
people are using the ECM which is still Loggable and thus need access to 
LogKit Loggers.

Thoughts? Can I do it ;)
-- 
Cheers,

Peter Donald


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

Reply via email to