使用 EJB 3.0 初始化 log4j 的最佳方法是什么?
我有一个 EAR,它只有 EJB (EJB3.0),没有 WAR 模块,服务器是 Linux 上的 JBOSS 4.3。
我想在服务器外部使用 log4j.properties 文件初始化 LOG4J 并使用 slf4j 作为外观。
初始化 log4j 的最佳方法是什么?
提前致谢
I have an EAR who has only EJBs (EJB3.0) and with out a WAR module, the server is JBOSS 4.3 over linux.
I want to initialize LOG4J with a log4j.properties file outside the server and use slf4j as facade.
What is the best way to initialize my log4j?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经在启动中初始化并将 log4j 放入 META-INF 文件夹中。并且只使用log4j而不使用Slf4j。 (EJB 3.1)
我希望下面的代码有帮助;
I have initialized in Startup and put log4j in META-INF folder. And just use log4j without Slf4j. (EJB 3.1)
I hope below code helps;