what logging is used by JBoss version 7.2?

て烟熏妆下的殇ゞ 提交于 2019-12-12 15:27:31

问题


There are many variations of logging that can be used in java. Most popular are the log4j and JDK logging.

I am wondering what logging is used by JBoss Application Server 7.2 version by default?

It is very hard to find the logger used by looking at the modules or configuartion files.

I would aprreciate if somebody can help me in this regard.

Thank you


回答1:


Generally speaking, logging should be broken into two parts. A logging facade and a log manager. J.U.L. and log4j don't separate these concepts. JBoss Logging and slf4j do though.

A logging facade should be just that, a facade. It's only role is to get a logger based on a category, generally a class name or package, and have methods that send your log statements to a log manager.

The job of the log manager is to handle sending the messages. This is where the handlers/appenders should be defined and configured.

To answer the question, JBoss Application Server 7.x, JBoss EAP and WildFly all use JBoss Logging for the logging facade and JBoss Log Manager for the log manager. You can use JBoss Logging, slf4j, JUL, log4j or commons logging for your facade.

I would recommend you configure the log manager using the logging subsystem provided with the application server. This is the only way to configure the server logging. You can use log4j to configure the log4j log manager for your deployment. However you if you do that you lose runtime configuration changes like turning on DEBUG logging.



来源:https://stackoverflow.com/questions/18318023/what-logging-is-used-by-jboss-version-7-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!