commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: turn off common logging
Date Mon, 18 Jun 2007 09:00:26 GMT
Hi Cheok,

Cheok Yan Cheng wrote on Monday, June 18, 2007 9:52 AM:

>>> are you sure, that these logs are generated by
> commons-logging at all? They look to me more
> tile the result of using the java.util.logging classes ...
> 
> Yes. I am pretty sure that my code only use
> common-logging. I do not have any other logging
> library in my classpath and I am using Java 6. I guess
> common-logging will choose java.util.logging by
> default.
> 
> I try to put the line in my source code :
> 
>  static {
> 
> System.setProperty("org.apache.commons.logging.Log",
> "org.apache.commons.logging.impl.NoOpLog");
>  }
> 
> Those log messages will gone.
> 
> However, now I would like to put it in properties
> file. It seems that
> 
> java -cp config -jar jstock.jar
> 
> with
> 
> config/commons-logging.properties
> 
> doesn't work for my case.
> 
> Any comment? Thank you.

OK. It does not work, since the classpath at the command line is ignored if your jar contains
a manifest with a classpath entry. I am not sure, if you can add a directory at that CP entry.

- Jörg

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


Mime
View raw message