Hello!<br />
<br />
I was wondering if anyone could provide some feedback on an issue I have come across regarding log output inside the JavaScript editor. I did alot of searching around and found some great resources, the latest being <a class='bbc_url' href='
http://wiki.eclipse.org/Logging_The_Events_-_Show_the_Typical_Log_Stack_(BIRT)'>http://wiki.eclipse.org/Logging_The_Events_-_Show_the_Typical_Log_Stack_(BIRT)</a>. I am able to get everything in the example to work except the call to fileHandler.setFormatter(new BirtEventFormatter()). If I comment this call out I get the output but in a fully bloated xml format.<br />
<br />
Here is a quick snippet of what I am working with now:<br />
~~ Inside initialize ~~<br />
// INTIALIZE THE LOGGER WITH A FILE BASED LOGGER<br />
importPackage(Packages.java.util.logging);<br />
importPackage(Packages.logging);<br />
<br />
var fileHandler = new FileHandler("c:/temp/javascript.log", false);<br />
<br />
try {<br />
fileHandler.setFormatter(new BirtEventFormatter());<br />
} catch (err) {}<br />
<br />
var rootLogger = Logger.getLogger("");<br />
rootLogger.addHandler(fileHandler);<br />
<br />
<br />
function log ( str ){<br />
Logger.getAnonymousLogger().info(str);<br />
}<br />
<br />
reportContext.setPersistentGlobalVariable("log", log);<br />
log("Initialize");<br />
<br />
~~ Inside afterFactory ~~<br />
log("after factory");<br />
<br />
var hdls = Logger.getLogger("").getHandlers();<br />
for (i = 0; i < hdls.length; i++) <br />
{<br />
Logger.getLogger("").removeHandler(hdls
);<br />
hdls.close();<br />
}<br />
<br />
My current project is running inside BIRT 2.1 and the example is a 2.2 project which may have something to do with it. How ever it feels like I'm simply not linking to the Java file correctly, or that my report simply doesn't 'see' my BirtEventFormatter class. If anyone has any feedback on the issue I would greatly appreciate it