Yes. That property would be in the ThreadContext Map in the log event.

Sent from my iPad

> On Jul 7, 2015, at 5:32 AM, Sandeep Dasika <dasika.sa...@gmail.com> wrote:
> 
> Ralph, thanks for your reply! In the source code for SocketNode, I see this
> line where it sets the following property for the LoggingEvent object:
> 
> // store the known remote info in an event property
> event.setProperty("log4j.remoteSourceInfo", remoteInfo);
> 
> and remote info is the remote client address. Is there any way I can
> retrieve this in the config file supplied to the socket server?
> 
> On Tue, Jul 7, 2015 at 4:33 PM, Ralph Goers <ralph.go...@dslextreme.com>
> wrote:
> 
>> I would suggest that you set the ip address in the ThreadContext at the
>> beginning of each request or operation. Then all log events will contain
>> that information.
>> 
>> Sent from my iPad
>> 
>>> On Jul 7, 2015, at 12:01 AM, Sandeep Dasika <dasika.sa...@gmail.com>
>> wrote:
>>> 
>>> Hi log4j team,
>>> 
>>> I have been using log4j in production systems, and it has delivered us
>>> fantastically. My query is around the SocketAppender and
>> SimpleSocketServer
>>> functionality. We have a group of servers that generate log events. These
>>> are configured to write to file appenders. We also want to have error
>> logs
>>> written to a central log file so that it can be easy to browse to find
>>> potential issues in our product.
>>> 
>>> I have the natural setup for the remote logging up and running perfectly
>> -
>>> The clients that generate the LoggingEvent objects (our production
>> servers)
>>> all write to a SocketAppender that will send it across to the remote
>>> SimpleSocketServer and that ultimately writes to another file appender,
>>> which gives us the centralised log file to browse. However, since we want
>>> to run it at ERROR level, it would be best for us if we have some client
>> ID
>>> (maybe IP) of the client that sends a particular logging event at the
>>> remote end so that it would be easier for us to pinpoint the problems in
>>> our systems. Seems like I'm not sure how that can be done in log4j. Any
>>> hints/suggestions on this would really help me out!
>>> 
>>> Thanks in advance.
>>> Cheers!
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>> 
>> 


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

Reply via email to