jboss-log4j.xml 中的类别 VS 记录器标签
我们应该在 jboss-log4j.xml 中使用什么来打开/关闭我们产品的跟踪 - “类别”或“记录器”标签?
默认情况下,JBoss 在 jboss-log4j.xml 中使用“类别”。
但据我所知,“类别”已被弃用,应使用“记录器”。
为什么 JBoss 在新产品中使用已弃用的“类别”标签?
What should we use in jboss-log4j.xml in order to turn on/off traces for our product - "category" or "logger" tag?
By default JBoss uses "category" in jboss-log4j.xml.
But as far as I know "category" is deprecated and "logger" should be used instead.
Why JBoss uses deprecated "category" tag in a new product?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
习惯,我怀疑。我仍然使用
category
。它的行为与 logger 完全相同,实际上没有区别。Habit, I suspect. I still to use
category
also. It behaves exactly the same aslogger
, there really is no difference.log4j.xml(不限于jboss-log4j.xml)中的
category
是常见做法,并且不推荐使用。被弃用的是Category 类
,就像在代码中使用Category
一样,在 log4j.xml 中,类别和记录器都可以使用。较新的代码可能会在 log4j.xml 中包含
logger
。旧的方式是类别
。category
in the log4j.xml (not limited to jboss-log4j.xml) is common practice and its not deprecated. What got deprecated is theCategory Class
as in usage ofCategory
in code like,In log4j.xml, both category and logger can be used. Probably the newer code will have the
logger
in log4j.xml. Old way iscategory
.