Skip to content

Commit

Permalink
1.changed loglevel.
Browse files Browse the repository at this point in the history
2.method modifier changed.
- JestHttpClient.createJsonStringEntity(from private to protected)
  • Loading branch information
happyprg committed Jun 2, 2014
1 parent 8e14ef4 commit 406a1a3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions jest/src/main/java/io/searchbox/client/http/JestHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,18 @@ protected HttpUriRequest constructHttpMethod(String methodName, String url, Obje
return httpUriRequest;
}

private String createJsonStringEntity(Object data) {
protected String createJsonStringEntity(Object data) {

String entity;

if (data instanceof String && isJson(data.toString())) {
entity = data.toString();
} else {
entity = gson.toJson(data);
}

JsonElement el = new JsonParser().parse(entity);

log.debug("request body to json - " + System.getProperty("line.separator") + new GsonBuilder().setPrettyPrinting().create().toJson(el));


log.debug("request body to json - "+ data);

return entity;
}

Expand Down

0 comments on commit 406a1a3

Please sign in to comment.