commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Pérez Testa <japte...@indra.es>
Subject Re: Setting Logger Level in POI
Date Wed, 18 Jun 2003 17:10:55 GMT
It seems that POI Default Logger is SystemOutLogger.
SystemOutLogger enables ALL levels as it appears in the following code

public class SystemOutLogger extends POILogger
{
 .............................................

    /**
     * Check if a logger is enabled to log at the specified level
     *
     * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
     * @param obj1 The logger to check.
     */

    public boolean check(final int level)
    {
       return true;
    }
...............
}

You can change DefaultLogger changing  the nex system property : 
org.apache.poi.util.POILogger

and setting for example a CommonsLogger 
(org.apache.poi.util.CommonsLogger) backed by a Log4JLogger which is 
"easily" configurable_.

_Hope it helps!


Mehra, Vishal wrote:

>	I have a  java application which executes dynamic SQL and based on the result set generates
appropriate .XLS file. This java application internally uses cocoon and poi libraries to generate
the Excel file. 
>
>	By default, for each cell generation approximately 10 lines are getting printed on the
console. As, I have a large Excel file, generation of this file is taking a very long time.
It appears the debug level is set to DEBUG (if not specified)
>
>	Is there a POI api to set the log level to FATAL which will reduce the number of log
message displayed. 
>
>	One thought would be to disable debug log. Is there a configuration to turn off this
log.
>
>	Thanks,
>
>Vishal
>
>---------------------------------------------------------------------
>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