So i have this task to log activities to a file, but it has to be done remotely on the server side, Remote logging. I found out that before log4j 2.6 to listen to a port we used TcpSocketServer which started a server using LogEventBridge
        * This class was in core.net.server which is no longer available
        * Assuming it is not used anymore and the only similar/closest class, TcpSocketManager

My task was simple
1. Send logging info to a port.
2. Log info from port to a file.

Socket appender configuration

appender.socket.type = Socket
appender.socket.name= Socket_Appender
appender.socket.host = "IP address"
appender.socket.port = 8101
appender.socket.layout.type = SerializedLayout
appender.socket.connectTimeoutMillis = 2000
appender.socket.reconnectionDelayMillis = 1000
appender.socket.protocol = TCP

Then i tried this

/*public static final Logger LOG = LogManager.getLogger(myapp.class.getName());*/
and got the following error
/**//*main ERROR TcpSocketManager (TCP:IPAddress:8111) caught exception and will continue: java.net.SocketTimeoutException: connect timed out
I need help how to go ahead.

Thank You
Abhinav Rana

Reply via email to