Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 22102 invoked from network); 6 Feb 2003 11:34:21 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 6 Feb 2003 11:34:21 -0000 Received: (qmail 23064 invoked by uid 97); 6 Feb 2003 11:35:48 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 23057 invoked from network); 6 Feb 2003 11:35:47 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 6 Feb 2003 11:35:47 -0000 Received: (qmail 20666 invoked by uid 500); 6 Feb 2003 11:34:02 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 20513 invoked from network); 6 Feb 2003 11:34:01 -0000 Received: from smtp012.mail.yahoo.com (216.136.173.32) by daedalus.apache.org with SMTP; 6 Feb 2003 11:34:01 -0000 Received: from pc-80-193-217-22-hw.blueyonder.co.uk (HELO lndevjs) (james?strachan@80.193.217.22 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 6 Feb 2003 11:34:00 -0000 Message-ID: <00c701c2cdd3$7cc51700$9865fea9@spiritsoft.com> From: "James Strachan" To: "Jakarta Commons Developers List" References: Subject: Re: [CLI] new design possibly? Date: Thu, 6 Feb 2003 11:32:51 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N From: "Nicola Ken Barozzi" > Henri Yandell wrote, On 06/02/2003 11.18: > > > > On Thu, 6 Feb 2003, Henri Yandell wrote: > > > >>On Thu, 6 Feb 2003, Nicola Ken Barozzi wrote: > >> > >>>One point that we would like to see is that commons logging is never a > >>>*hard* dependency. That means that if commons logging is not in the > >>>classpath, the package should be able to work correctly, even if with > >>>logging disabled. > >> > >>Please justify this. Is it solely because you have people who refuse to go > >>near commons-logging, or is there a technical reason? > > > > > > I'm just funked. Ignore this. > > Naa, you are right, I have to justify it. > > The fact is that Commons Logging does not advocate IOC, Inversion of > Control, that is so dear to us. I know this is probably gonna end up a pointless religious debate or flamefest but I couldn't resist... I see no reason why someone can't use Commons Logging in an IOC pattern if thats what they want to do. It boils down to a framework/religious issue rather than anything fundamentally wrong with commons logging. e.g. import org.apache.commons.logging.Log; public class SomeService { // container sets the logger to be used using IOC public void setLog(Log log); } Whether there's an explicit LogEnabled marker interface or bean introspection is used (I prefer the latter) makes little difference - its still IOC isn't it? Unless IOC is only IOC with explicit marker interfaces? Comparing commons logger and the logkit in Avalon Framework (and ignoring their history for now) - they now look practically identical apart from the LogEnabled interface (which isn't really needed anyway though I'm sure if it was essential to Avalon users there wouldn't be much resistence to adding something like this to commons-logging). Indeed there's nothing to stop someone using logkit in Avalon Framework in a non-IOC way. public class SomeBean { private Logger log = new ConsoleLogger(); ... } So objecting about commons-logging not advocating IOC doesn't seem to make sense. It'd be trivial to write a commons Log implementation that uses logkit if you're really concerned about logging integration - though for command line tools I'm not sure its worth it. Isn't it about time we merged logkit into commons logging? (ducks religious war) > And also that IMHO these small packages > should not log by default, since logging in these cases is not a runtime > requirement as in server applications but a debugging and development > requirement. Why would a command line application thats using commons-logging be concerned about the IOC of the logger thats used by the main()? I can see this pro-logkit argument applying to other reusable components, but one thats tied to a command line tool (and so a stand alone application by definition) seems a bit of a leap. > It's ok if it uses Commons Logging, as long as it's not a hard > dependency. I think it's a good common ground, and it's what is done ATM. > > I have personally committed Commons Logging in POI, and made it not > break the usage of the jar if not present, so should make it clear what > I think of the usage of Commons Logging in the scenario of reusable > components. How did you do that? By writing yet another logging abstraction? :-) James ------- http://radio.weblogs.com/0112098/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org