From 238195f0588a61023f15c0027c368a21404f72b1 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Thu, 20 Feb 2014 14:07:41 +0000 Subject: [PATCH] Log operation that caused an I/O error git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1570195 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/http/impl/conn/LoggingInputStream.java | 12 ++++++------ .../apache/http/impl/conn/LoggingOutputStream.java | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/LoggingInputStream.java b/httpclient/src/main/java/org/apache/http/impl/conn/LoggingInputStream.java index 5b14fd515..d42a18329 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/LoggingInputStream.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/LoggingInputStream.java @@ -60,7 +60,7 @@ class LoggingInputStream extends InputStream { } return b; } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.input("[read] I/O error: " + ex.getMessage()); throw ex; } } @@ -76,7 +76,7 @@ class LoggingInputStream extends InputStream { } return bytesRead; } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.input("[read] I/O error: " + ex.getMessage()); throw ex; } } @@ -92,7 +92,7 @@ class LoggingInputStream extends InputStream { } return bytesRead; } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.input("[read] I/O error: " + ex.getMessage()); throw ex; } } @@ -102,7 +102,7 @@ class LoggingInputStream extends InputStream { try { return super.skip(n); } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.input("[skip] I/O error: " + ex.getMessage()); throw ex; } } @@ -112,7 +112,7 @@ class LoggingInputStream extends InputStream { try { return in.available(); } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.input("[available] I/O error : " + ex.getMessage()); throw ex; } } @@ -137,7 +137,7 @@ class LoggingInputStream extends InputStream { try { in.close(); } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.input("[close] I/O error: " + ex.getMessage()); throw ex; } } diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/LoggingOutputStream.java b/httpclient/src/main/java/org/apache/http/impl/conn/LoggingOutputStream.java index 48e63c5ad..c70cb1700 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/LoggingOutputStream.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/LoggingOutputStream.java @@ -54,7 +54,7 @@ class LoggingOutputStream extends OutputStream { try { wire.output(b); } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.output("[write] I/O error: " + ex.getMessage()); throw ex; } } @@ -65,7 +65,7 @@ class LoggingOutputStream extends OutputStream { wire.output(b); out.write(b); } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.output("[write] I/O error: " + ex.getMessage()); throw ex; } } @@ -76,7 +76,7 @@ class LoggingOutputStream extends OutputStream { wire.output(b, off, len); out.write(b, off, len); } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.output("[write] I/O error: " + ex.getMessage()); throw ex; } } @@ -86,7 +86,7 @@ class LoggingOutputStream extends OutputStream { try { out.flush(); } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.output("[flush] I/O error: " + ex.getMessage()); throw ex; } } @@ -96,7 +96,7 @@ class LoggingOutputStream extends OutputStream { try { out.close(); } catch (IOException ex) { - wire.input("I/O error: " + ex.getMessage()); + wire.output("[close] I/O error: " + ex.getMessage()); throw ex; } }