cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: AbstractLogEnabled...
Date Tue, 16 Oct 2007 16:16:45 GMT
Vadim Gritsenko wrote:
> Carsten Ziegeler wrote:
> Ok - no enableLogging. But what about previous questions? To avoid
> dependency, switch should be made, isn't it?
Yes. It's not required for 2.2 but we should definitly have it replaced
for 2.3; the sooner the better, so if you want to go ahead, +1. :)

>> Now, today, I think even this class can be removed as it creates an
>> unnecessary dependency to the module containing it. If you want to log,
>> just instantiate the commons logger in your own code and use it.
> But this adds a dependency on commons logging ;-)

>> If you
>> want to make it configurable, provide a setLogger() method like this
>> abstract class does.
> IMHO it is cleaner to use a base class. No need to replicate logging
> stuff everywhere - it is easier to extend from common base class (where
> it is possible / makes sense)
Yes, "where it makes sense" is the key here :) Getting the logger for
commons logging is one line of code (and it's a short line), so you
don't gain much if you have a base class with this one line. I think we
can use the base class where we have a dependency to the module with the
base class anyway. In other cases we should avoid it.

Carsten Ziegeler

View raw message