Meaningless Drivel is fun!*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Singleton implementation in loggig / log4j" Watch "Singleton implementation in loggig / log4j" New topic
Author

Singleton implementation in loggig / log4j

Mainak Goswami
Ranch Hand

Joined: May 21, 2006
Posts: 50

Hi,

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.

Mainak


------------------------------------
Mainak
idiotechie
------------------------------------
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Singleton implementation in loggig / log4j
 
Similar Threads
Singleton Pattern
why static should be avoided with web app?
Single pattern
immutable
how to make single instance of a class?