File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Singleton implementation in loggig / log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Singleton implementation in loggig / log4j" Watch "Singleton implementation in loggig / log4j" New topic

Singleton implementation in loggig / log4j

Mainak Goswami
Ranch Hand

Joined: May 21, 2006
Posts: 50


I was just going through the Log4j architecture and wondering if Log4j does implement Singleton pattern. Can anybody please highlight the log4j architecture and how does it implement singleton pattern. Any pointers will also be useful.
Thanks in advance.


E Armitage

Joined: Mar 17, 2012
Posts: 888
Log4j does not restrict the possible set of loggers. It uses an inheritance of Loggers inheriting from the root logger so I don't know if you would put that down as singleton.
I agree. Here's the link:
subject: Singleton implementation in loggig / log4j
Similar Threads
Singleton Pattern
why static should be avoided with web app?
Single pattern
how to make single instance of a class?