log4j创建Logger实例解读
API:https://logging.apache.org/log4j/1.2/apidocs/
一些对该方面源码的解读
http://blog.youkuaiyun.com/wanglz666/article/details/43195149
http://www.blogjava.net/DLevin/archive/2012/07/10/382678.html
http://www.2cto.com/kf/201207/139798.html
如何获取日志对象?
1.调用Logger静态方法getLogger(Class clazz)
static public Logger getLogger(Class clazz)
{
return LogManager.getLogger(clazz.getName());
//用该class的名字作为参数,调用LogManager的getLogger方法
//若该名字的Logger存在则获取,若不存在则新建
}
LogManager的getLogger方法
public static Logger getLogge