commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [logging] How to setLevel() for commons logging? (urgent :)
Date Wed, 02 Apr 2003 22:18:39 GMT


On Wed, 2 Apr 2003, Thomas Nichols wrote:

> Date: Wed, 02 Apr 2003 22:54:37 +0100
> From: Thomas Nichols <nx10mail@yahoo.co.uk>
> Reply-To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
> 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

Mime
View raw message