[英]How do I integrate BIRT logging into application logging?
I'm developing a web application using Spring Framework, Hibernate, and Wicket. 我正在使用Spring Framework,Hibernate和Wicket开发Web应用程序。 I've integrated the BIRT runtime engine as the reporting component, but I have a problem with logging.
我已将BIRT运行时引擎集成为报告组件,但我遇到了日志记录问题。 Every other component in the application eventually delivers its log messages to
log4j
. 应用程序中的每个其他组件最终都将其日志消息传递给
log4j
。 I have a single log4j
configuration file which allows me to adjust the detail of each component. 我有一个
log4j
配置文件,允许我调整每个组件的细节。
BIRT, however, wants me to call setLogConfig()
with a directory name argument. 但是,BIRT要我用目录名参数调用
setLogConfig()
。 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. 第一个问题是,这给了我另一个文件系统路径放置在应用程序配置中,第二个问题是我不能使用跟随应用程序其余部分的相同工具来跟踪BIRT日志。
Does anybody have a solution to integrate BIRT logging into log4j
, or some other application wide logging system? 有没有人有解决方案将BIRT日志记录集成到
log4j
或其他一些应用程序范围的日志记录系统?
The answer is quiet simple: yes. 答案很简单:是的。
BIRT uses the java util logging, but you can write a simple log handler redirecting to log4j. BIRT使用java util日志记录,但您可以编写一个简单的日志处理程序重定向到log4j。 I could repeat it, but the solution is still offered in the BIRT-FAQ in Eclipse-Wiki
我可以重复一遍,但解决方案仍然在Eclipse-Wiki的BIRT-FAQ中提供
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.