JBoss 服务器上某些 EJB Jar 的日志记录配置
您可以在 JBoss 服务器上指定单个 EJB Jar 的日志记录级别吗?我有两个带有两个不同 Web 服务的 EJB Jars。我希望第一个 jar 中的 WS 日志完全打印到服务器日志文件中,而第二个 jar 中的 WS 日志无关紧要,我不希望它们打印在任何地方。可以在JBoss上配置吗?
我正在使用 log4j 记录器。
can you specify on JBoss server logging level for single EJB Jar? I've got two EJB Jars with two different Web Services. I would like the WS logs from first jar to be printed completely to server log file whereas WS logs from second jar are irrevelant and i don't want them printed anywhere. Can it be configured on JBoss?
I'm using log4j logger.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JBoss 附带了一个名为
TCLFilter
的日志过滤器,它允许您通过生成附加程序的部署来过滤附加程序。请参阅此页面了解如何使用它。这可能有效也可能无效,具体取决于您部署 EJB JAR 的方式。如果它们都在一个 EAR 中,那么我认为您运气不好,除非您可以配置
TCLFilter
来指定 EAR 中的各个 EJB JAR。如果 EJB JAR 是单独部署的,那么TCLFilter
应该相当容易工作。JBoss comes with a logging filter called
TCLFilter
that allows you to filter appenders by the deployment that generated them. See this page for how to use it.Depennding on how you deploy your EJB JARs, this may or may not work. If they're all in one EAR, then I think you're out of luck, unless you can configure the
TCLFilter
to specify the individual EJB JAR within the EAR. If the EJB JARs are deployed on their own, thenTCLFilter
should be fairly easy to get working.