How do I integrate BIRT logging into application logging?
Asked Answered
S

1

6

I'm developing a web application using Spring Framework, Hibernate, and Wicket. I've integrated the BIRT runtime engine as the reporting component, but I have a problem with logging. Every other component in the application eventually delivers its log messages to log4j. I have a single log4j configuration file which allows me to adjust the detail of each component.

BIRT, however, wants me to call setLogConfig() with a directory name argument. The first problem is that this gives me yet another filesystem path to place in the application configuration, and the second problem is that I can't follow BIRT logs using the same tools that follow the rest of the application.

Does anybody have a solution to integrate BIRT logging into log4j, or some other application wide logging system?

Spent answered 9/3, 2011 at 14:11 Comment(0)
I
5

The answer is quiet simple: yes.

BIRT uses the java util logging, but you can write a simple log handler redirecting to log4j. I could repeat it, but the solution is still offered in the BIRT-FAQ in Eclipse-Wiki

Indemnification answered 9/5, 2011 at 20:10 Comment(1)
I've just updated to BIRT 3.7, and I can confirm this works. I've added my logging config using this recipe in my main routine: LogManager.getLogManager().readConfiguration( MyRuntime.class.getResourceAsStream("loghandler.properties"))Spent

© 2022 - 2024 — McMap. All rights reserved.