You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Tobias Flohre <lo...@gmx.de> on 2001/10/31 15:44:17 UTC
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 (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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>