JBoss 服务器上某些 EJB Jar 的日志记录配置

发布于 2024-08-02 21:48:36 字数 179 浏览 2 评论 0原文

您可以在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

桜花祭 2024-08-09 21:48:36

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, then TCLFilter should be fairly easy to get working.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文