logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Levy, Jeremy" <Jeremy.L...@morganstanley.com>
Subject RE: Different client's log file?
Date Fri, 11 Aug 2006 14:42:07 GMT
In my application, we have the consumer pass in the name of the application that is using our
service.  

So we generally only have about 4,5 consumers.  This is small enough that we can manually
add them to the properties file.  However, as our utility grows I don't want to have to maintain
or add appenders to the properties file.

Is it possible to dynamically change the file name of a log file based on a value?

So if someone calls a web service, if I call getLogger or maybe MDC/NDC is there a way to
change the name of the log file based a value passed in at runtime?

Jeremy

-----Original Message-----
From: Javier Gonzalez [mailto:jagonzal@gmail.com] 
Sent: Thursday, August 10, 2006 1:23 AM
To: Log4J Users List
Subject: Re: Different client's log file?

On 8/10/06, wolverine my <wolverine.my@gmail.com> wrote:
> Hi!
>
> I'm actually developing a web application using servlet and so I can 
> use the client's IP address instead of the client.getName()...

Ah, a web application... no way to know beforehand every single client's id.

mmm, I don't think you can have a log file per client, but maybe you can still include the
ip address in the logger name. That way, you can grep over the logs with the ip address of
a given client to study just that client's activity.

--
Javier González Nicolini

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
 
 
 
--------------------------------------------------------

Important Notice to Recipients:
It is important that you do not use e-mail to request, authorize or effect the purchase or
sale of any security or commodity, to send fund transfer instructions, or to effect any other
transactions. Any such request, orders, or instructions that you send will not be accepted
and will not be processed by Morgan Stanley.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message