logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jordi" <jba...@hotmail.com>
Subject Different logging levels for each library client application
Date Mon, 07 Jun 2004 15:38:07 GMT
Hi,

I have a library with a small number of public methods, every method carrying a "client application
id" parameter.

The number of different client ids can be between 3 and 10, no more.

I'd like to be able to set different logging levels for each client id.

My first guess was to set up parallel hierarchies like

- client1.com.wombat.clazz

- client2.com.wombat.clazz

so that I can set log4j.logger.client1=DEBUG and log4j.logger.client2=INFO

but I'm afraid that would impact performance negatively as I would have to call getLogger
in each method call to retrieve the right logger for the request's client id.

Has anyone faced this problem before and found a better approach?

Rgds, *jordi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message