logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Performance and Logger.getLogger()
Date Wed, 02 Apr 2003 14:23:18 GMT

Howdy,
You're in a difficult position ;(

My gut instinct says a map lookup will be faster than
Logger.getLogger(), so your idea about populating a map might be good.
Of course you will still have one Logger.getLogger() call for each
logger, but that's far better than calling it every time.  

You also have to enforce a convention regarding logger naming, e.g. use
the class name for the logger name.  That may not be a big deal, as it's
a common convention anyways, but note that log4j by itself does not
require this convention.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Wulf Wechsung [mailto:ww@contexo.de]
>Sent: Wednesday, April 02, 2003 9:11 AM
>To: Log4j (E-Mail)
>Subject: Performance and Logger.getLogger()
>
>
>Hey!
>
>I read in the faq that calling Logger.getLogger() will kill app
>performance.
>I am currently writing a wrapper for a beast called the SAP/webMethod
>business connector which is an app-server providing a 'unique' flow
>language
>to programm services. It would be to quite an effort to ask the
developers
>of those services to keep references to their logger and pass it for
each
>log statement, so I would did an implementation that determines which
>logger
>to use by itself. Unfortunatly it has to call Logger.getLogger() for
each
>log-call.
>The question is: would application performance be better if I kept the
>Logger references in a hashtable and retrieved them from there by name?
>This might seem like an unnecessary question but I just don't know how
much
>over-heap there is involved when calling Logger.getLogger().
>
>Thanks in advance,
>Wulf
>
>PS:"I made a serious effort to see if this has been asked before via
the
>mail archives, so please excuse me if it, in fact, has been"
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org




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: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message