Hey!

Erik:

The FAQ:
http://jakarta.apache.org/log4j/docs/FAQ.html


You are on the right track. 

The question is:

{
        Logger logger = Logger.getLogger("foo.bar");

        logger.warn("");
        logger.error("");

}(Good)
vs.
{
        Logger.getLogger("foo.bar").warn("");
        Logger.getLogger("foo.bar").warn("");
        Logger.getLogger("foo.bar").warn("");
}(Bad)




Yoav:

Oh, logger naming is not much of a problem (since the developers have no way
of assigning them). The individual services have well-formed names like
folder.subfolder:servicename, so I just replace the ':' by '.' and the log4j
hierachy works again.

Well, maybe I'll end up doing some performance meassuring myself, I'll let
everyone taking an interest know.

Thanks for the quick response :-)
Wulf

-----Ursprungliche Nachricht-----
Von: Erik Price [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 2. April 2003 16:24
An: Log4J Users List
Betreff: Re: Performance and Logger.getLogger()




Wulf Wechsung wrote:

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

Hi Wulf,

I did not see this FAQ.  Can you post the URL so that I can read it too? 
  Currently I have a call to Logger.getLogger() in every class and the 
returned Logger is stored in a static field.  This is not the common way 
to acquire a logger?

Thank you,


Erik


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

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

Reply via email to