What is the pattern used in log4j

I needed to understand the design pattern used in the log4j library. Since it provides registrars for different classes, is this a factory?

Any other inputs / pointers to them are greatly appreciated.

+3
source share
4 answers

Log4j uses a singleton design pattern, as it will have one instance of the class. check this out for reference http://www.oodesign.com/singleton-pattern.html

+2
source

What kind of template do you mean? Creation, behavioral or structural?

, factory -pattern, , Ceki Gülcü (ceki@apache.org, log4j-user@jakarta.apache.org ), log4j, .

+1

Log4j is a Singleton template that matches the development template.

+1
source

It uses a mixture of design patterns, uses Singleton and Chain patterns.

I checked the e-learning site.

+1
source

Source: https://habr.com/ru/post/1758354/


All Articles