Merge pull request #33 from UlfS/log-response-on-debug

Log response json on debug level
pull/38/head
Richard Körber 2017-08-12 10:17:53 +02:00 committed by GitHub
commit e6ee682648
1 changed files with 1 additions and 2 deletions

View File

@ -214,13 +214,12 @@ public class DefaultConnection implements Connection {
JSON result = null; JSON result = null;
String response = "";
try { try {
InputStream in = InputStream in =
conn.getResponseCode() < 400 ? conn.getInputStream() : conn.getErrorStream(); conn.getResponseCode() < 400 ? conn.getInputStream() : conn.getErrorStream();
if (in != null) { if (in != null) {
result = JSON.parse(in); result = JSON.parse(in);
LOG.debug("Result JSON: {}", response); LOG.debug("Result JSON: {}", result);
} }
} catch (IOException ex) { } catch (IOException ex) {
throw new AcmeNetworkException(ex); throw new AcmeNetworkException(ex);