commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <>
Subject Re: [logging] To depend or not to depend?
Date Wed, 12 Feb 2003 18:47:28 GMT
Hi peeps,

Leo Simons wrote:
>> Would it be acceptable
>>> to add a getName() or something similar to the Log interface and the
>>> implementations?
> It is a backwards-incompatible change

tried a few things here, and I think the answer to my own question is a 
definitive "no": it breaks backwards (binary) compatibility across 
jakarta commons, and who knows where else. It is potentially disastrous 
for projects that provide their own implementation of the Log interface. 
Consider, for example, a log implementation where no name is ever 
associated with a category. It's a change-of-contract, indeed.

I think all alternatives mentioned within the boundary of 
commons-logging are also not very good moves, like adding a NamedLog, 
which will add to jar size, probably will not be used in many apps, and 
moreover breaks the entire *single interface* paradigm -- the main 
reason (yep, assumption here ;) that commons-logging exists.

Also, one can safely assume that in true IoC (ie avalon), the thing (ie 
the container) that sets up the logging also has the information as to 
how the logging is to be named, and hence can pass this in to an avalon 
CommonsLogger on creation.

Got up to speed on some new tech this weekend, and lo and behold, plexus 
already has a CommonsLogger which does exactly that:

ain't that cool :D

We had some discussion over @ avalon on including a CommonsLogger class 
in 4.1.4, but it didn't make it (we need to remove some logging-related 
confusion ;). Subject will be raised again for 4.1.5, or maybe 
CommonsLogger goes into a utility library.

Last thing I took away from this thread is that I do think a 
commons-noop-logging.jar is a common need for those times when you don't 
want logging, or at least don't want a dependency. I'll send in a patch 
if it ever does become enough of an itch :D

anyway, thanks for all your feedback!


- Leo

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message