Compensation: http://blog.csdn.net/anlina_1984/article/details/5313023
Method protected static Logger Logger = Logger.getlogger (Propertiesconfiglocalloader.class);//Enter the package Org.apache.log4j;public class Logger extends Category {//list only this static method Staticpubliclogger GetLogger (class Clazz) {return Logmanager.getlogger (Clazz.getname ());}} Go in this public class Logmanager {//And just list this static method public static Logger GetLogger (class Clazz) {//Delegate the Actua L Manufacturing of the logger to the logger repository. Return Repositoryselector.getloggerrepository (). GetLogger (Clazz.getname ()); }}//go in this//recumbent slot an interface with only so many package Org.apache.log4j.spi;public interface Repositoryselector {/** Returns a {@link Logge Rrepository} depending on the context. Implementors must make sure, a valid (Non-null) loggerrepository is returned. */Public loggerrepository getloggerrepository ();} Go in this//slot, and then the interface package Org.apache.log4j.spi;public interface Loggerrepository {//This ends the public Logger GetLogger ( String name);} And then what? Don't understand
Logger.getlogger (*.class) source analysis