BIRT: logging into the eclipse console

Need help setting up BIRT registration.

Birt: 2.6.2 Eclipse: 3.6.2 (reporting)

I can register with the eclipse birt designer for the file as instructed here .

But not sure how to redirect logs to standard eclipse console. Tried the following script but did not work:

importPackage(Packages.java.util.logging); var cHandler = new ConsoleHandler(); cHandler.setFormatter(new SimpleFormatter()); var rootLogger = Logger.getLogger(""); logger.addHandler(cHandler); Logger.getAnonymousLogger().info(str); 
+6
source share
2 answers

A workaround may be the NTail plugin.

Write whatever you want to the file, then browse this file using NTail. See this logging answer .

Even if you want to control Eclipse stdout (redirected to a file) using Eclipse ...

0
source

Do you have a logging configuration file? You do not need to, but if you do not set the log level in the configuration file, you may need to set it at run time:

 logger.setLevel(Level.ALL); 

If this does not work, you can also try using log4j instead of java.utils.logging .

0
source

Source: https://habr.com/ru/post/891960/


All Articles