Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 118 invoked from network); 2 Apr 2003 22:18:40 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 2 Apr 2003 22:18:40 -0000 Received: (qmail 4199 invoked by uid 1059); 2 Apr 2003 22:18:39 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 2 Apr 2003 22:18:39 -0000 Date: Wed, 2 Apr 2003 14:18:39 -0800 (PST) From: "Craig R. McClanahan" To: Jakarta Commons Users List Subject: Re: [logging] How to setLevel() for commons logging? (urgent :) In-Reply-To: <5.2.1.0.0.20030402224957.015d6340@pop.mail.yahoo.co.uk> Message-ID: <20030402141522.K2856@icarus.apache.org> References: <5.2.1.0.0.20030402202116.015b1980@pop.mail.yahoo.co.uk> <5.2.1.0.0.20030402154249.01c288b0@mail.plus.net> <5.2.1.0.0.20030402154249.01c288b0@mail.plus.net> <5.2.1.0.0.20030402202116.015b1980@pop.mail.yahoo.co.uk> <5.2.1.0.0.20030402224957.015d6340@pop.mail.yahoo.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 2 Apr 2003, Thomas Nichols wrote: > Date: Wed, 02 Apr 2003 22:54:37 +0100 > From: Thomas Nichols > Reply-To: Jakarta Commons Users List > To: commons-user@jakarta.apache.org > Subject: Re: [logging] How to setLevel() for commons logging? (urgent :) > > At 13:41 02/04/2003 -0800, Craig R. McClanahan wrote: > > > >On Wed, 2 Apr 2003, Thomas Nichols wrote: > > > > > Has a commons.logging.Log.setLevel() been ruled out for architectural > > > reasons? This would have kept my code generic. > > > >Yes, because it is out of scope and inconsistent with the charter of > >commons-logging. > > > > > > > > Thanks, > > > Thomas. > > > > > > >Craig > > No problem - thanks for the work you've put in. Would the suggestion of a > non-typesafe accessor method to the underlying Log4J / JDK14 logger object > invoke spontaneous vomiting? > If you really want to do stuff like that, you can do so by creating your own LogFactory implementation, which returns specialized subclasses of the log implementation objects -- without corrupting the underlying architecture of commons-logging :-). Of course, if you find it necessary to access these logger objects, it seems to me that using commons-logging is a waste of time -- you're going to be tying yourself to the underlying implementation anyway. > Thomas. Craig