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
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.