简体   繁体   English

如何将log4j添加到使用OSGI捆绑包的Web应用程序

[英]How to add log4j to a web application that use OSGI bundle

I am trying to add log4j library to record the exchange between client-server to a web application that I created which is a hello world application . 我试图添加log4j库来记录客户端服务器与我创建的Web应用程序(这是一个hello world应用程序)之间的交换。

So I used the following tutorial to create this app [1]: https://netbeans.org/kb/docs/javaee/maven-osgiservice-cdi.html 因此,我使用以下教程创建了此应用[1]: https : //netbeans.org/kb/docs/javaee/maven-osgiservice-cdi.html

Now I want to add log4j but the problem that I don't know where to add it in MavenHelloServiceApi , in MavenHelloServiceImpl or in MavenHelloWebClient 现在我想添加log4j,但是我不知道在MavenHelloServiceApiMavenHelloServiceImplMavenHelloWebClient中添加它的问题

您应该在将要使用的每个捆绑软件中添加log4j依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM