Logger.getlogger (*.class) source analysis

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.