Author: fhanik
Date: Mon Feb 13 08:00:24 2006
New Revision: 377402
URL: http://svn.apache.org/viewcvs?rev=377402&view=rev
Log:
Corrected logging of IOException, keep alive close will cause an IOException on the other
end.
Modified:
tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/TcpReplicationThread.java
Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/TcpReplicationThread.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/TcpReplicationThread.java?rev=377402&r1=377401&r2=377402&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/TcpReplicationThread.java
(original)
+++ tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/TcpReplicationThread.java
Mon Feb 13 08:00:24 2006
@@ -70,7 +70,14 @@
} catch (Exception e) {
//this is common, since the sockets on the other
//end expire after a certain time.
- log.warn ("TCP Worker thread in cluster caught '" + e + "' closing channel",
e);
+ if ( e instanceof IOException ) {
+ //dont spew out stack traces for IO exceptions unless debug is enabled.
+ if (log.isDebugEnabled()) log.debug ("IOException in replication worker,
unable to drain channel. Probable cause: Keep alive socket closed.", e);
+ else log.warn ("IOException in replication worker, unable to drain channel.
Probable cause: Keep alive socket closed.");
+ } else if ( log.isErrorEnabled() ) {
+ //this is a real error, log it.
+ log.error("Exception caught in TcpReplicationThread.drainChannel.",e);
+ }
// close channel and nudge selector
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
|