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.tests/test/org/eclipse/birt/report/engine/api/EngintTaskLoggerTest.java
{
	public void testLogger( ) throws Exception
	{
		Logger logger = Logger.getAnonymousLogger( );
		ByteArrayOutputStream out = new ByteArrayOutputStream( );
		StreamHandler handler = new StreamHandler( out, new SimpleFormatter( ) );
		handler.setLevel( Level.FINEST );
		logger.addHandler( handler );
		logger.setLevel( Level.FINE );
		engine.setLogger( logger );
		new File( "./utest/" ).mkdirs( );
		copyResource(
				"org/eclipse/birt/report/engine/api/engine-task-logger-test.rptdesign",
				"./utest/reportdesign.rptdesign" );
		IReportRunnable runnable = engine
				.openReportDesign( "./utest/reportdesign.rptdesign" );
		IRunTask task = engine.createRunTask( runnable );
		task.setParameter( "sample", "==golden values==", "displayText" );
		task.run( "./utest/report.rptdocument" );
		task.close( );
		engine.setLogger( logger );
		removeFile( "./utest" );
		handler.close( );
		System.out.println( out.toString( ) );
		assertTrue( out.toString( ).indexOf( "==golden values==" ) != -1 );
	}
}