结构
LogManager
private:
LoggerContextFactory factory是Log4jContextFactory
LoggerContext
private:
XmlConfiguration configuration:存储xml配置文件
LoggerRegistry loggerRegistry:存储logger
Logger
private:
String name
MessageFactory2 messageFactory
FlowMessageFactory flowMessageFactory;
LoggerContext context;
PrivateConfig privateConfig:存储了xml配置信息
getLogger的处理流程
我们看下reconfigure的内容
LoggerContext如何获得logger呢?
直接初始化了一个Logger