I've been searching for any example of how to get the remote client's ip address printed in the log4j2 TcpSocketServer server side log file and I'm hoping I'm just not searching for the right thing. Is it possible to the remote client's ip and if so how?
If I use TcpSocketServer I can get this when the server starts up:
2017-04-10 11:30:31,316 [Log4j2-0] DEBUG [TcpSocketServer.java:231] Socket accepted: Socket[addr=/10.64.1.2,port=52412,localport=4560]
What I want is for the ip address to be somehow included on each logging line:
2017-04-10 11:30:31,316 [Log4j2-0] [10.64.1.2] DEBUG [MyFile.java:17] Test Logging line