Skip to content

Commit 0d53099

Browse files
Joerogerhu
authored andcommitted
Log outgoing JSON (#24)
This may become unnecessary if/when we move to OkHttp3 (#19). But for now it's the only way to see the exact JSON data that is being sent over the websocket.
1 parent aefdbef commit 0d53099

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ParseLiveQuery/src/main/java/com/parse/ParseLiveQueryClientImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ private Task<Void> sendOperationAsync(final ClientOperation clientOperation) {
125125
public Void call() throws Exception {
126126
JSONObject jsonEncoded = clientOperation.getJSONObjectRepresentation();
127127
String jsonString = jsonEncoded.toString();
128+
if (Parse.getLogLevel() <= Parse.LOG_LEVEL_DEBUG) {
129+
Log.d(LOG_TAG, "Sending over websocket: " + jsonString);
130+
}
128131
webSocketClient.send(jsonString);
129132
return null;
130133
}

0 commit comments

Comments
 (0)