问题描述
可在Java中使用的日志记录有很多变化.最受欢迎的是Log4J和JDK记录.
我想知道JBOSS Application Server 7.2版本默认使用了哪些记录?
很难通过查看模块或配置文件来找到使用的记录器.
如果有人可以在这方面帮助我.
谢谢
推荐答案
一般而言,日志记录应分为两个部分.伐木立面和日志管理器.七月. log4j不会分开这些概念. jboss logging and slf4j做.
伐木外墙应该就是一个立面.唯一的角色是根据类别(通常是类名称或软件包)获取记录器,并具有将您的日志语句发送给日志管理器的方法.
日志管理器的工作是处理发送消息.这是处理和配置处理程序/附录的地方.
要回答这个问题,JBOSS应用程序服务器7.x,Jboss EAP和Wildfly ass last laster laster logging for Logging立面和日志管理器的JBOSS日志管理器.您可以使用JBOSS LOGGGING,SLF4J,JUL,LOG4J或CONMONS LOMOGG in ACADE.
我建议您使用应用程序服务器提供的记录子系统配置日志管理器.这是配置服务器记录的唯一方法.您可以使用log4j为部署配置Log4J Log Manager.但是,如果您这样做,则会丢失运行时配置更改,例如打开DEBUG记录.
问题描述
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
推荐答案
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.