Raymond DeCampo wrote:

Berin Loritsch wrote:

I had an encouraging chat with the Log4J folks (Ceki in particular),
and we have some good news from the logger front.  We all knew that
Log4J surpasses LogKit in the feature list.  We also know that LogKit
does its job well for only 25% of the weight.  We also know that
Log4J is not currently friendly to IOC with the Logger.getLogger()
call.


Stupid question time (especially since every else seems to know): What does IOC stand for?

Inversion of Control. I.e. parents provide all required stuff for children. In component based systems it reigns supreme. The container will provide the logger, configuration, etc. to the components. The component cannot poll the container for what is available or access information that it is not supposed to.

In logging systems, it translates to being able to get child loggers,
but not parent ones.

The only thing that Log4J 1.3 cannot address is the factory method
(Logger.getLogger()) due to compatibility issues.  At the same time,
Log4J 2.0 will address this issue.  In fact Logger will not be a
class, but an interface.


What about creating a separate interface, e.g. ILogger that Logger can implement? Then Logger still exists as is for backwards compatibility and moving forward people could use ILogger. I'm not sure of the total impact of this on log4j but I imagine it is doable. The simple approach is to make ILogger contain every public method that Logger contains and then to replace Logger with ILogger throughout the log4j code wherever possible.

Well, Avalon does have an interface that it uses (as well as the wrapper class for Log4J).

The main question is wether it is worth it to invest in that at this
time.  For Log4J 1.1 to Log4J 1.2, there was a change from Category to
Logger.  I think it would be better for your users if you hold off until
2.0 for changing from Logger to something else.

:) Besides, I never liked "I" prefixes on interfaces anyway.


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



Reply via email to