log4j.properties中log4j.rootLogger 与log4j.rootCategory 有什么区别 .
来源:互联网 发布:高夫和妮维雅 知乎 编辑:程序博客网 时间:2024/05/20 23:30
public class Category
- extends java.lang.Object
- implements AppenderAttachable
原文地址:http://blog.csdn.net/caolaosanahnu/article/details/7553999
下面是在log4j官方的API中写的,足以能解释logger与category的区别:
This class has been deprecated and replaced by theLogger
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 loggeris 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 willnever 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 theCategory
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.properties中log4j.rootLogger 与log4j.rootCategory 有什么区别 .
- log4j.rootLogger 与log4j.rootCategory 有什么区别
- log4j.rootLogger 与log4j.rootCategory 有什么区别
- log4j.rootLogger 与log4j.rootCategory 有什么区别 .
- log4j.rootLogger与log4j.rootCategory的区别
- log4j 的rootLogger与rootCategory的区别
- log4j.rootCategory
- log4j.rootLogger
- log4j.rootLogger 是配置
- Log4j rootLogger配置
- log4j.xml与log4j.properties
- Log4j配置文件 log4j.properties
- Log4J配置文件log4j.properties
- log4j.properties log4j 配置
- log4j配置log4j.properties
- 【log4j】log4j.properties
- log4j配置文件,log4j.properties
- log4j与log4j.properties的配置说明
- static 关键字
- 深度分析NandFlash—控制器参数TACLS、TWRPH0和TWRPH1的确定(以TQ2440开发板上的K9F2G08U0A为例)
- textview Spannable 应用
- 缩小数据文件尺寸报ORA-03297的处理办法
- sharepoint 2010 传入邮件配置
- log4j.properties中log4j.rootLogger 与log4j.rootCategory 有什么区别 .
- Shared Everything和share-nothing区别
- PHP CURL获取Web Service出现乱码问题
- 【Win7系统毋需软件禁止C盘别人写入】
- 删除指定路径根目录所有文件-python
- 新人报道
- android 如何设置背景的透明度
- C++中指针和引用的区别
- 解说Win32的窗口子类化