logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sambath Kumar" <Samba...@elind.com>
Subject RE: problem with socketappender
Date Wed, 31 Oct 2001 16:00:25 GMT
  The above mentioned problem is occuring in LoggingServer when your
client application
  who uses socket appender to send log messages closes the socket

	This exactly means that your client application terminates after
sending only on log request.
      So try it inside the while loop, like
		while(true) {
  So there is no problem with socketappender or socket node. Your client
exits after one log request, that it the reason.

  If u send your LogClient i will try to help u if u have still doubts. 

P. Sambath Kumar.

-----Original Message-----
From: Tobias Flohre [mailto:log4j@gmx.de]
Sent: Wednesday, October 31, 2001 8:14 PM
To: log4j-dev@jakarta.apache.org
Subject: problem with socketappender

Hello everybody,

I have a problem with the socketappender.
Everytime I run my program, the socketconnection is closed by this:

2001-10-31 14:47:56,133 INFO  [Thread-5] net.SocketNode
- Caught java.net.SocketException closing conneciton.

It differs from run to run how many log-statements get through the
connection, but for sure the exception occurs at one time. Do you have
any suggestion?
For information: The server runs on the same machine as the application.
Here is the code of the class socketnode where the exception is thrown,
83 is indicated.

    try {
      while(true) {	
	event = (LoggingEvent) ois.readObject();	
	remoteCategory = hierarchy.getInstance(event.categoryName);
	event.category = remoteCategory;
    catch(java.io.EOFException e) {
      cat.info("Caught java.io.EOFException closing conneciton.");
    catch(java.net.SocketException e) {
      cat.info("Caught java.net.SocketException closing conneciton.");
    catch(Exception e) {
      cat.error("Unexpected exception. Closing conneciton.", e);
    try {
    catch(Exception e) {
      cat.info("Could not close connection.", e);	

Thank you,

GMX - Die Kommunikationsplattform im Internet.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

View raw message