> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 11:50 PM
> To: [EMAIL PROTECTED]
> Subject: getting SimpleSocketServer to log each line with clients IP
> 
> 
> I have many clients sending their logging info to 1 centralized
> SimpleSocketServer.
> 
> When multiple clients are writing at the same time, you can 
> not figure out
> which message is coming from which client.
> 
> I would like to configure the logging so that each line 
> contains the clients
> ip address.

The latest HEAD release within CVS for log4j has a newer SocketNode class
(which is used by SimpleSocketServer), which adds a Property
'log4j.remoteSourceInfo' to each incoming LoggingEvent with the remote
Location Info (IP address).  

If you output this property in your appenders within the VM that has the
SimpleSocketServer receiving the events, say, via a PatternLayout, you
should see this remote Location info with each LoggingEvent.

Hope that helps.

cheers,

Paul Smith

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

Reply via email to