JBoss 7.2版使用什么日志? [英] what logging is used by JBoss version 7.2?

查看:136
本文介绍了JBoss 7.2版使用什么日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有许多可以在Java中使用的日志记录变体.最受欢迎的是log4j和JDK日志记录.

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

我想知道JBoss Application Server 7.2版本默认使用什么日志记录?

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.

谢谢

推荐答案

通常来说,日志记录应分为两部分.日志记录正面和日志管理器.七月.和log4j不会分开这些概念. JBoss Logging和slf4j可以.

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.

要回答该问题,JBoss Application Server 7.x,JBoss EAP和WildFly都将JBoss Logging用于日志记录外观,并将JBoss Log Manager用于日志管理器.您可以将JBoss Logging,slf4j,JUL,log4j或commons logging用于您的外观.

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.

我建议您使用应用程序服务器随附的日志记录子系统配置日志管理器.这是配置服务器日志记录的唯一方法.您可以使用log4j来为您的部署配置log4j日志管理器.但是,如果这样做,则会丢失运行时配置更改,如打开DEBUG日志记录.

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.

这篇关于JBoss 7.2版使用什么日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆