commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rodrigo Canabrava" <canab...@gmail.com>
Subject Re: turn off common logging
Date Mon, 11 Jun 2007 19:16:23 GMT
Hello,

The property you set works if you are using the SimpleLog
implementation. If it didn't work, then you're using another one.
Pay attention to the fact that, by default, SimpleLog will be the last
option that commons logging will try to use. If you're using JDK 1.4
or later, then commons-logging will choose the Jdk14Logger.

You can try to force the use of SimpleLog, including the system property:

org.apache.commons.logging.Log = org.apache.commons.logging.impl.SimpleLog

(it also works including the previous line in the
commons-logging.properties file)

After that, setting the level to fatal the way you did should work.

a+
Rodrigo


2007/6/11, Cheok Yan Cheng <yccheok@yahoo.com>:
> Hello,
>
> This is the first time I am using common logging
> library.
>
> May I know how I can turn-off all the logging message
> in my application? I search the documentation, I try
> to set the logging level to fatal (all my log are in
> info and error). However, I still see my log message
> print out. Please advice. Thanks.
>
> I try to turn off it through the following code. Is it
> correct?
>
> Thanks!
>
>
> private static final Log log =
> LogFactory.getLog(MainFrame.class);
>
>     /**
>      * @param args the command line arguments
>      */
>     public static void main(String args[]) {
>
> System.setProperty("org.apache.commons.logging.simplelog.defaultlog",
> "fatal");
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> Don't get soaked.  Take a quick peak at the forecast
> with the Yahoo! Search weather shortcut.
> http://tools.search.yahoo.com/shortcuts/#loc_weather
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message