logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Flohre <lo...@gmx.de>
Subject problem with socketappender
Date Wed, 31 Oct 2001 14:44:17 GMT
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 (SocketNode.java:83)
- 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, line
83 is indicated.

    try {
      while(true) {	
	event = (LoggingEvent) ois.readObject();	
	remoteCategory = hierarchy.getInstance(event.categoryName);
	event.category = remoteCategory;
	if(event.priority.isGreaterOrEqual(remoteCategory.getChainedPriority())) {
	  remoteCategory.callAppenders(event);	
	}
      }
    }
    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.");  83!!
    }
    catch(Exception e) {
      cat.error("Unexpected exception. Closing conneciton.", e);
    }
    
    try {
      ois.close();
    }
    catch(Exception e) {
      cat.info("Could not close connection.", e);	
    }  
  }
}


Thank you,
Tobias

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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


Mime
View raw message