logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javier Gonzalez" <jagon...@gmail.com>
Subject Re: Different client's log file?
Date Thu, 10 Aug 2006 04:33:30 GMT
On 8/9/06, wolverine my <wolverine.my@gmail.com> 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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message