Wildfly 和 war 文件中的日志配置需要什么
我使用 Wildfly 作为我的应用程序服务器。它在standalone.xml 文件中配置了自己的日志记录子系统。那么我们的应用程序中需要什么日志配置呢?
I am using wildfly as my application server. It has its own logging subsystem configured in standalone.xml file. Then what is the need for logging configuration in our application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这确实取决于情况,但通常我会说您的应用程序中不需要日志记录配置。如果您不需要任何特殊的处理程序,那么使用 WildFly 中的日志子系统实际上有一个优势。
如果您使用 Web 控制台、WildFly 的 CLI 工具或其他形式的 WildFly 管理,那么您可以配置日志记录,而无需重新启动服务器或重新部署应用程序。相反,如果您在应用程序中包含日志记录配置并想要进行更改,则需要重新部署应用程序。
It really depends, but generally I would say there is no need for the logging configuration in your application. If you don't need any special handlers then there is actually an advantage to using the logging subsystem in WildFly.
If you use the web console, WildFly's CLI tool or some other form of management for WildFly then you can configure logging without having to restart the server or re-deploying your application. On the contrary if you include a logging configuration in your application and want to make a change you need to re-deploy your application.