File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "About Log4J hierarchy question" Watch "About Log4J hierarchy question" New topic

About Log4J hierarchy question

Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 214
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
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:
subject: About Log4J hierarchy question
It's not a secret anymore!