You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Andreas Schildbach <an...@schildbach.de> on 2004/08/05 17:31:19 UTC

[commons-logging] Initialization of JDK1.4-Logger

I'm current developing an application that directly uses the JDK1.4 
java.util.logging-Framework. However, it also utilizes a framework 
(Spring) that uses commons-logging for logging.

Ideally, I'd like to set log levels at one central place. For my 
application, the choice is easy: I'm using one logging.properties and 
append -Djava.util.logging.config.file to the JVM options.

Unfortunately, commons-logging seems to do its own programmatic 
initialization of the JDK logging component: my configuration file is 
ignored for all output of the Spring framework. One of the authors of 
Spring claims that Spring is not doing any special. I also found no 
mention of this issue in the docs/faq.

My question: How can I make commons-logging to _not_ initialize the 
underlying logging component and use the default configuration mechanism 
of the component instead?

The issue in Spring JIRA:

http://opensource.atlassian.com/projects/spring/browse/SPR-245

Regards,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons-logging] Initialization of JDK1.4-Logger

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi Andreas

AFAIK the commons-logging log wrapper for java.util.logging uses the  
default configuration in the usual way. i taken a look again at the  
code and i can see nothing wrong. i'm not an expert on the sun logging  
API so why not take a look at the source yourself  
(http://cvs.apache.org/viewcvs.cgi/jakarta-commons/logging/src/java/ 
org/apache/commons/logging/impl/Jdk14Logger.java?rev=1.13&view=markup)  
and see if you can see anything i cannot.

personally, i suspect that it's most likely to be a problem with your  
configuration path (which can be a PITA when it comes to web  
applications). creating a test web application with a servlet that just  
calls the sun logging API sounds like a good way to debug the  
configuration.

- robert

On 5 Aug 2004, at 16:31, Andreas Schildbach wrote:

> I'm current developing an application that directly uses the JDK1.4  
> java.util.logging-Framework. However, it also utilizes a framework  
> (Spring) that uses commons-logging for logging.
>
> Ideally, I'd like to set log levels at one central place. For my  
> application, the choice is easy: I'm using one logging.properties and  
> append -Djava.util.logging.config.file to the JVM options.
>
> Unfortunately, commons-logging seems to do its own programmatic  
> initialization of the JDK logging component: my configuration file is  
> ignored for all output of the Spring framework. One of the authors of  
> Spring claims that Spring is not doing any special. I also found no  
> mention of this issue in the docs/faq.
>
> My question: How can I make commons-logging to _not_ initialize the  
> underlying logging component and use the default configuration  
> mechanism of the component instead?
>
> The issue in Spring JIRA:
>
> http://opensource.atlassian.com/projects/spring/browse/SPR-245
>
> Regards,
>
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org