aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-http-client
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@oath.com>2018-02-19 16:25:17 +0100
committerBjørn Christian Seime <bjorncs@oath.com>2018-02-19 16:25:17 +0100
commit9b29c142674d947bd042c68223602bfe8d7b8bb0 (patch)
tree0bf9bd864363d224d1a3252b4280f116ce5d7e63 /vespa-http-client
parent4960a96e98607b611b494663721ea1ae76df8bab (diff)
Fix bug where exception message is not included in log entry
Diffstat (limited to 'vespa-http-client')
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java
index 16a541f939c..ee83803e9eb 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java
@@ -319,12 +319,12 @@ class IOThread implements Runnable, AutoCloseable {
successfullHandshakes.getAndIncrement();
} catch (ServerResponseException ser) {
executeProblemsCounter.incrementAndGet();
- log.log(Level.INFO, "Handshake did not work out " + endpoint, Exceptions.toMessageString(ser));
+ log.log(Level.INFO, "Handshake did not work out {0}: {1}", new Object[] {endpoint, Exceptions.toMessageString(ser)});
drainFirstDocumentsInQueueIfOld();
return ThreadState.CONNECTED;
} catch (Throwable throwable) { // This cover IOException as well
executeProblemsCounter.incrementAndGet();
- log.log(Level.INFO, "Problem with Handshake " + endpoint, Exceptions.toMessageString(throwable));
+ log.log(Level.INFO, "Problem with Handshake {0}: {1}", new Object[] {endpoint, Exceptions.toMessageString(throwable)});
drainFirstDocumentsInQueueIfOld();
client.close();
return ThreadState.DISCONNECTED;
@@ -336,11 +336,11 @@ class IOThread implements Runnable, AutoCloseable {
gatewayThrottler.handleCall(processResponse.transitiveErrorCount);
}
catch (ServerResponseException ser) {
- log.info("Problems while handing data over to gateway " + endpoint + ": " + Exceptions.toMessageString(ser));
+ log.log(Level.INFO, "Problems while handing data over to gateway {0}: {1}", new Object[] {endpoint, Exceptions.toMessageString(ser)});
return ThreadState.CONNECTED;
}
catch (Throwable e) { // Covers IOException as well
- log.info("Problems while handing data over to gateway " + endpoint + ": " + Exceptions.toMessageString(e));
+ log.log(Level.INFO, "Problems while handing data over to gateway {0}: {1}", new Object[] {endpoint, Exceptions.toMessageString(e)});
client.close();
return ThreadState.DISCONNECTED;
}