log4j.rootLogger 与log4j.rootCategory 有什么区别
来源:互联网 发布:淘宝代运营怎么卖服务 编辑:程序博客网 时间:2024/05/18 03:24
- 下面是在log4j官方的API中写的,足以能解释logger与category的区别。。。
public class Category
- extends java.lang.Object
- implements AppenderAttachable
This class has been deprecated and replaced by the Logger
subclass. It will be kept around to preserve backward compatibility until mid 2003.
Logger
is a subclass of Category, i.e. it extends Category. In other words, a logger is a category. Thus, all operations that can be performed on a category can be performed on a logger. Internally, whenever log4j is asked to produce a Category object, it will instead produce a Logger object. Log4j 1.2 will never produce Category objects but only Logger
instances. In order to preserve backward compatibility, methods that previously accepted category objects still continue to accept category objects.
For example, the following are all legal and will work as expected.
// Deprecated form:
Category cat = Category.getInstance("foo.bar")
// Preferred form for retrieving loggers:
Logger logger = Logger.getLogger("foo.bar")
The first form is deprecated and should be avoided.
There is absolutely no need for new client code to use or refer to the Category
class. Whenever possible, please avoid referring to it or using it.
See the short manual for an introduction on this class.
See the document entitled preparing for log4j 1.3 for a more detailed discussion.
- Author:
- Ceki Gülcü, Anders Kristensen
- log4j.rootLogger 与log4j.rootCategory 有什么区别
- log4j.rootLogger 与log4j.rootCategory 有什么区别
- log4j.rootLogger 与log4j.rootCategory 有什么区别 .
- log4j.properties中log4j.rootLogger 与log4j.rootCategory 有什么区别 .
- log4j.rootLogger与log4j.rootCategory的区别
- log4j 的rootLogger与rootCategory的区别
- log4j.rootCategory
- log4j.rootLogger
- log4j.rootLogger 是配置
- Log4j rootLogger配置
- log4j的性能瓶颈定位与性能优化(org.apache.log4j.spi.RootLogger)
- log4j的性能瓶颈定位与性能优化(org.apache.log4j.spi.RootLogger)
- log4j的rootLogger及其他坑爹的地方
- logback与Log4J的区别
- logback与Log4J的区别
- logback与Log4J的区别
- logback与Log4J的区别
- logback与Log4J的区别
- CRM下午茶(四):销售成熟度与CRM
- DIV+CSS网站布局最重要的几个东西
- 让Linux不再古老---蓝牙安装手记
- 【抬杠涨能耐,实践出真知】关于某个技术问题争吵
- CRM下午茶(五)-销售成熟度与CRM
- log4j.rootLogger 与log4j.rootCategory 有什么区别
- JAVA中的接口和抽象类(加深初学者理解)
- 怎样使用CWnd::SetTimer (第一个参数)
- 走出软件作坊(四十四)(四十五)(四十六)(四十七)(四十八)(四十九)
- CMPP和SMPP协议比较
- Ant十五大最佳实践
- 缓冲区溢出攻防
- Mac OS X Leopard: 配置Apache, PHP, SQLite, MySQL, and phpMyAdmin(一)
- prototype-1.3.1.js中的类继承实现的改进