hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1043064 - /httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/NHttpClientProtocolHandler.java
Date Tue, 07 Dec 2010 14:36:26 GMT
Author: olegk
Date: Tue Dec  7 14:36:26 2010
New Revision: 1043064

URL: http://svn.apache.org/viewvc?rev=1043064&view=rev
Log:
Reduce priority of HTTP and I/O exceptions from ERROR to DEBUG

Modified:
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/NHttpClientProtocolHandler.java

Modified: httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/NHttpClientProtocolHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/NHttpClientProtocolHandler.java?rev=1043064&r1=1043063&r2=1043064&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/NHttpClientProtocolHandler.java
(original)
+++ httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/NHttpClientProtocolHandler.java
Tue Dec  7 14:36:26 2010
@@ -185,11 +185,15 @@ class NHttpClientProtocolHandler impleme
                 connState.setRequestState(MessageState.COMPLETED);
             }
         } catch (IOException ex) {
-            this.log.error("I/O error: " + ex.getMessage(), ex);
+            if (this.log.isDebugEnabled()) {
+                this.log.debug("I/O error: " + ex.getMessage(), ex);
+            }
             shutdownConnection(conn);
             handler.failed(ex);
         } catch (HttpException ex) {
-            this.log.error("HTTP protocol exception: " + ex.getMessage(), ex);
+            if (this.log.isDebugEnabled()) {
+                this.log.debug("HTTP protocol exception: " + ex.getMessage(), ex);
+            }
             closeConnection(conn);
             handler.failed(ex);
         }
@@ -208,9 +212,11 @@ class NHttpClientProtocolHandler impleme
                 processResponse(conn, connState);
             }
         } catch (IOException ex) {
-            this.log.error("I/O error: " + ex.getMessage(), ex);
-            handler.failed(ex);
+            if (this.log.isDebugEnabled()) {
+                this.log.debug("I/O error: " + ex.getMessage(), ex);
+            }
             shutdownConnection(conn);
+            handler.failed(ex);
         }
     }
 
@@ -231,7 +237,9 @@ class NHttpClientProtocolHandler impleme
                 connState.setRequestState(MessageState.COMPLETED);
             }
         } catch (IOException ex) {
-            this.log.error("I/O error: " + ex.getMessage(), ex);
+            if (this.log.isDebugEnabled()) {
+                this.log.debug("I/O error: " + ex.getMessage(), ex);
+            }
             shutdownConnection(conn);
             handler.failed(ex);
         }
@@ -274,11 +282,15 @@ class NHttpClientProtocolHandler impleme
                 processResponse(conn, connState);
             }
         } catch (IOException ex) {
-            this.log.error("I/O error: " + ex.getMessage(), ex);
+            if (this.log.isDebugEnabled()) {
+                this.log.debug("I/O error: " + ex.getMessage(), ex);
+            }
             shutdownConnection(conn);
             handler.failed(ex);
         } catch (HttpException ex) {
-            this.log.error("HTTP protocol exception: " + ex.getMessage(), ex);
+            if (this.log.isDebugEnabled()) {
+                this.log.debug("HTTP protocol exception: " + ex.getMessage(), ex);
+            }
             closeConnection(conn);
             handler.failed(ex);
         }
@@ -308,7 +320,9 @@ class NHttpClientProtocolHandler impleme
                 }
             }
         } catch (IOException ex) {
-            this.log.error("I/O error: " + ex.getMessage(), ex);
+            if (this.log.isDebugEnabled()) {
+                this.log.debug("I/O error: " + ex.getMessage(), ex);
+            }
             shutdownConnection(conn);
             handler.failed(ex);
         }



Mime
View raw message