File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes About Log4J hierarchy question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "About Log4J hierarchy question" Watch "About Log4J hierarchy question" New topic
Author

About Log4J hierarchy question

Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 207
Dear all,
I am going to reading the document of Log4J. However, I have a very basic question that I don't understand.
What is the uses of Logger Hierachy? It seems the document doesn't mention the uses of the hierarchy. Actually, logger is just an object with a name associated on it. I really don't understand why use hierarchy.
Please help
Thanks
Benson
Aneesha Singh
Ranch Hand

Joined: Jan 14, 2002
Posts: 47
The advantage of the Logger hierarchy is the granularity of logging that can be achieved.
Logging verbosity may be controlled either at the high level or the low level as the levels are loosely coupled and new levels can easily be added at a later date. If lots of control is not required over the logging in your application, you can manage with just the root logger. On the other hand you can delve as deep and as detailed as you like. Hope that helps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About Log4J hierarchy question
 
Similar Threads
Singleton implementation in loggig / log4j
Logging strategies in large applications
log4j: Log file not being generated
Log4J Debug levels and over-riding
log4j category