aspose file tools*
The moose likes Other Open Source Projects and the fly likes Method getLogger of log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Method getLogger of log4j" Watch "Method getLogger of log4j" New topic
Author

Method getLogger of log4j

Swerrgy Smith
Ranch Hand

Joined: Mar 26, 2010
Posts: 91
Hi all,

Can you tell me why we always need to use a class (or a name of a class) in the getLogger method?


Why don't we simply use a same name (for example "ABCDEFGH") for every .java file ?


Thank you very much.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3742
    
  16
Swerrgy Smith wrote:Why don't we simply use a same name (for example "ABCDEFGH") for every .java file ?

You could, but when you are reading a log file, which do you think would be more useful to see as part of the messages - the name of the class that generated the log message or a string that has no relation to the java class ?


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Method getLogger of log4j