Bug 170763 Log files are created even if the log level has been set to OFF or the log dir to null
Even if you set the log level to OFF (e.g. within the BIRT report viewer web application) empty log files are created in BIRT's log directory. The same is the case if the log directory has been set to null. If the directory does not exist, a stack trace is printed to System.err. This is due to the fact that org.eclipse.birt.report.engine.api.impl.EngineLogger sets up a java.util.logging.FileHandler no matter what. It shouldn't do this if the log level is OFF or the directory is null.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/EngineLogger.java
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
/**
 * BIRT Logger is a logger associated with the global "org.eclipse.birt" name space. "org.eclipse.birt" is the ancestor of all of the BIRT packages.
 * According to Java 1.4 Logging mechnism, by default all Loggers also send their output to their parent Logger.
 * Thus, in any BIRT package, if developer uses Logger.getLogger( theBIRTClass.class.getName() ) to create a logger, 
 * the logger will send the logging requests to the BIRTLogger.  
 * And BIRTLogger will log the informatin into the global BIRT log file. The global log file is specified by main application.
 * If developer doesn't want the log of his module is logged into the global BIRT log file, 
 * he can simply use logger.setUseParentHandlers(false) to stop sending the logging request to the BIRTLogger.
 * <br>
 * Note: Because of a Java API's bug, an additional .lck file will be created for each log file. 
 * 		 Please see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4775533 for detail.    
 */
public class EngineLogger {
	
	static private final String BIRT_NAME_SPACE = "org.eclipse.birt" ; 
	static private FileHandler logFileHandler = null;
	static private String dirName = null;
	/**
	 * This function should only called by the main application that starts BIRT. It will add a new log handler to the global BIRT logger. 
	 * @param directoryName - the directory name of the log file (e.g. C:\Log). The final file name will be the directory name plus an unique file name.
	 * 						  For example, if the directory name is C:\Log, the log file name will be something like C:\Log\ReportEngine_2005_02_26_11_26_56.log
	 * @param logLevel - the log level to be set. If logLevel is null, it will be ignored.
	 */
	public static void startEngineLogging( String directoryName, Level logLevel )
	{
		dirName = directoryName;