Bug 165188 logging per report
Setting up a dedicated (birt) report server, which serves all our web apps, leads to a logging desaster. Birtegine logs all messages to one file. There's no info which rptdesign caused the logmessage or who (e.g. user) caused the logmessage. Retrieving who/which rpt caused some logmessage is not possible! There are two possible solutions: (a) prefixing each logmessage with a userdefineable message (task.setLogprefix("myprefix")) (b) set an outputstream for each task (task.setLoggingOutputStream(outputstream)) to split the huge logfile to many small pieces.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/EngineLogger.java
* 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;
		
		Logger logger = Logger.getLogger( BIRT_NAME_SPACE );
		assert (logger != null);
		
		if ( logLevel != null )