Howdy,
My guess is you would be right regarding one instance.  Since every
instance is thread-safe, you don't need to worry about concurrency.
Performance should be improved as the logger hierarchy is much smaller
and simpler.

If you want to simplify even more, you could simply use the root logger
instead of your own, i.e. instead of Logger.getLogger("Activity") do
Logger.getRootLogger().

Use a Profiler to verify the number of Logger instances under this usage
scenario.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Vivek Kapadekar [mailto:[EMAIL PROTECTED]
>Sent: Monday, June 09, 2003 12:14 PM
>To: Log4J Users List
>Subject: Logger instance and performance
>
>
>Hi All
>I understand that the Logger instance that gets created depends on the
>String that is passed to the static getLogger("some name") method of
>Logger. And this String usually is same as FQN of the class.  But, we
>really do not need  to use the FQN of the class , as our log messages
>are not going to be used for debugging purpose, so it does not matter
>from where they originated.
>So if we pass the same string always say "Activity"  to the getLogger()
>method  from every single class of our application, there will be One
>and only one instance of Logger that will perform the logging . Is that
>right ? if so, will it effect performance ? How about concurrency ?
>Any suggestions ?
>
>Thanks for the help
>
>--Viv




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to