On Mar 8, 2007, at 4:26 PM, Zakaria, Faheem wrote:

Since this is a legacy system, our
plan is to lookup the Log4j Logger on every log request through
LogManager.getLogger(String).

Could you explain your reasoning here. Maybe give some examples of the existing logging calls in your code and why you think you should repeatedly call getLogger.




1. Is it okay to use LogManager in this manner?

Yes, but not advisable.

2. Are there any performance issues with this approach?

Likely substantial.

3. Are there any scalability concerns with this approach?

Possibly.

4. Will reloading the log4j.xml configuration work with this approach?

Shouldn't introduce any new problems.

5. Instead of using the LogManager, does it make sense to use a static
ConcurrentHashMap to store ("logger name",Logger) key value pairs and
perform a local Logger lookup on every log request?

Duplicates what should be going on in LogManager, might be more efficient depending on the implementation of LogManager.

6. What would you recommend?





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

Reply via email to