You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by sagun shakya <Sa...@Sun.COM> on 2009/04/02 00:54:47 UTC

commons logging + Jdk14Logger

hi,

I'm trying to use commons logging with the the Jdk14Logger  
implementation. I have it working to some extent but I'm hitting one  
issue that I think is due to an incorrect setting in my properties  
file. So
I know my application is using  
org.apache.commons.logging.impl.Jdk14Logger implementation because
when I run my application as:
java -Djava.util.logging.config.file=logging.properties -cp target/ 
foo.jar com.my.package.bar <option>

I see the logging configuration for Jdk14 working as I configure.

Both the "commons-logging.properties" and "logging.properties" are  
under src/main/resources so they are in the classpath.

In  the commons-logging.properties file I have:

org 
.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
logger= org.apache.commons.logging.impl.Jdk14Logger
logger.configuration.name=java.util.logging.config.file
logger.configuration.value=logging.properties

The last 3 lines is not correct, I believe, but I haven't been able to  
figure what it should be.

Is it possible to configure commons-logging.properties to look at the  
the properties and not read the non default JRE/lib/logging.properties  
file without having to pass it in with command line options?

thanks,

Sagun


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


Re: commons logging + Jdk14Logger

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
I don't think that commons-logging will have any effect on the JDK logging 
config, since that is fixed from start-up and can only be changed 
programmatically afterwards, which is not how commons-logging works.


sagun shakya on 01/04/09 23:54, wrote:
> I'm trying to use commons logging with the the Jdk14Logger 
> implementation. I have it working to some extent but I'm hitting one 
> issue that I think is due to an incorrect setting in my properties file. So
> I know my application is using 
> org.apache.commons.logging.impl.Jdk14Logger implementation because
> when I run my application as:
> java -Djava.util.logging.config.file=logging.properties -cp 
> target/foo.jar com.my.package.bar <option>
> 
> I see the logging configuration for Jdk14 working as I configure.
> 
> Both the "commons-logging.properties" and "logging.properties" are under 
> src/main/resources so they are in the classpath.
> 
> In  the commons-logging.properties file I have:
> 
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
> logger= org.apache.commons.logging.impl.Jdk14Logger
> logger.configuration.name=java.util.logging.config.file
> logger.configuration.value=logging.properties
> 
> The last 3 lines is not correct, I believe, but I haven't been able to 
> figure what it should be.
> 
> Is it possible to configure commons-logging.properties to look at the 
> the properties and not read the non default JRE/lib/logging.properties 
> file without having to pass it in with command line options?


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