BIRT logging in the onFetch step of a dataset
- by Mark Underwood
Hi all,
Im having trouble with some javascript in the onFetch step of a dataset in a BIRT report.
I've added logging in the initialise step of the report in a few different ways. The runtime im using is Tivoli Common Reporting, and they supply a logging framework. Its initialised as so
reportContext.setPersistentGlobalVariable("logfileName", "DateRangeParm.log");
setupLogging();
logInitialize();
debugLogger("Started logging in initialize step");
debugLogger("Date: " + new Date());
This works fine to log on the steps of the report(ie initialise, BeforeRender, AfterRender etc.) but I cant seem to log anything in the Dataset steps such as onFetch etc.
Ive also tried
importPackage(Packages.java.util.logging);
var fileHandler = new FileHandler("/tmp/birt.log", true);
var rootLogger = Logger.getLogger("");
rootLogger.addHandler(fileHandler);
as the BIRT instructions tell me to do in the BIRTFAQ
Once again this allowed me to log things in the main report (ie BeforeRender etc) but not in the dataset onFetch Step. Ive also tried putting the previous javascript into the onFetch and that didnt seem to work either. Its a bit of a mystery.
Im running Ubuntu 9.04. IBM java 1.5. Eclipse 3.5.0 and BIRT 2.5.1.
Any help would be great.