commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David <>
Subject Re: logging: How to configure programatically for using java.util.logging
Date Thu, 06 Apr 2006 17:50:44 GMT
Thanks Boris,
  that if was looking for,

Boris Unckel <> wrote:

by mistake I responded directly to Simon and not the list.
Here my remark and his answer.


Von: Simon Kitching 
On Thu, 2006-04-06 at 12:05 +0200, Boris Unckel wrote:
> Hello,
> > Von: Simon Kitching 
> > On Thu, 2006-04-06 at 02:47 -0700, David wrote:
> > > Dear members,
> > > 
> > > I would like to use java.util.logging and configure it
> > > programatically, on the common-logging documentation there is 
> > > information about how to do
> > > it with the properties files, but I don't see the way for doing 
> > > directly on the source code.
> > >
> > > I have a simple class that have setLogger/getLogger, I just wanto to
> > > test in a tester class how should work for using java.util.loggins or 
> > >the Simple log from commons.
> > commons-logging does not provide *any* mechanism for configuring the
> > "real" underlying logging library (except for the special case of the
> There is a small misunderstanding:
> As I understand, he wants to know how to configure commons-logging not by
> property but by code. He is not interested in a "configure-the-underlying"
> method.

Ah, you might be right..

> As I currently know, there is no method available to choose the
> underlying-API from user code. You would have to provide your own
> implementation of the discovery and factory mechanism.

There *is* such a mechanism. This call:
will force the use of java.util.logging.

Of course it needs to be called before any Log instances are created...



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

New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message