On Mon, 29 Apr 2002, Christophe Felix-Henry wrote:

> Date: Mon, 29 Apr 2002 15:01:58 +0200
> From: Christophe Felix-Henry <[EMAIL PROTECTED]>
> Reply-To: Jakarta Commons Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [Logging]  Why Jdk14Logger contructor sets log level to INFO ?
>
> I don't understand why Jdk14Logger overwrites the JDK1.4 logging
> configuration file settings.
> Here is the Jdk14Logger constructor:
>
>    public Jdk14Logger(String name) {
>
>         logger = Logger.getLogger(name);
>         logger.setUseParentHandlers(true);
>         logger.setLevel(Level.INFO);
>    }
>
> The java.util.logging.Logger should be configured with the config file
> settings.
> I think the two lines that sets properties should be removed.
>

I think you're right ... the basic contract for commons-logging is to not
mess with the configuration of the underlying logging system.

>
> I have an other problem with JDK1.4 logging. The name of the class that
> issued the logging request is always
> "org.apache.commons.logging.impl.Jdk14Logger". Is it possible to  work
> around this problem ?
>

What problem does this cause you?  If you use commons-logging to wrap JDK
1.4 logging (or any other logging implementation) the price you pay for
portability is the extra wrapper class.

If you really wanted to change it for some reason, you can always
implement your own LogFactory (using the provided APIs and factory
discovery mechanism) to return whatever you want.

> Christophe
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to