Hi for this purpose use MDC & NDC See details more Use key & values in MDC
-----Original Message----- From: Javier Gonzalez [mailto:[EMAIL PROTECTED] Sent: Thursday, August 10, 2006 10:04 AM To: Log4J Users List Subject: Re: Different client's log file? On 8/9/06, wolverine my <[EMAIL PROTECTED]> wrote: > One or more clients connecting to the server. How can we log the > message into different client's log files? > > E.g. when there are client X, Y, Z connecting to the server. The > messages will be logged into X.log, Y.log and Z.log. > > This will be easier for us to debug when one client encounter problem. If the clients' names (every possible one) are known beforehand, you can create an appender for each client, and log to a logger named after the client - create your loggers as "Logger.getLogger(client.getName())" and attach an appender to each possible name. -- Javier González Nicolini --------------------------------------------------------------------- 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]